lib/aws-sdk-s3/plugins/accelerate.rb in aws-sdk-s3-1.9.0 vs lib/aws-sdk-s3/plugins/accelerate.rb in aws-sdk-s3-1.9.1
- old
+ new
@@ -58,19 +58,23 @@
endpoint = URI.parse(context.http_request.endpoint.to_s)
endpoint.scheme = 'https'
endpoint.port = 443
endpoint.host = "#{bucket_name}.s3-accelerate.amazonaws.com"
context.http_request.endpoint = endpoint.to_s
+ # s3 accelerate endpoint doesn't work with 'expect' header
+ context.http_request.headers.delete('expect')
end
def use_combined_accelerate_dualstack_endpoint(context)
bucket_name = context.params[:bucket]
validate_bucket_name!(bucket_name)
endpoint = URI.parse(context.http_request.endpoint.to_s)
endpoint.scheme = 'https'
endpoint.port = 443
endpoint.host = "#{bucket_name}.s3-accelerate.dualstack.amazonaws.com"
context.http_request.endpoint = endpoint.to_s
+ # s3 accelerate endpoint doesn't work with 'expect' header
+ context.http_request.headers.delete('expect')
end
def validate_bucket_name!(bucket_name)
unless BucketDns.dns_compatible?(bucket_name, _ssl = true)
msg = "unable to use `accelerate: true` on buckets with "