jclouds-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Timur Alperovich <notificati...@github.com>
Subject [jclouds/jclouds] GetBucketLocation should use path-style requests. (#1052)
Date Thu, 12 Jan 2017 02:21:00 GMT
When making a GetBucketLocation request, Amazon may route the request
to the bucket region. When making it with v4 signer, the request may
fail because of the region mismatch. Concretely, a request to
test.s3.amazonaws.com may resolve to s3-us-west-2-w.amazonaws.com. The
request itself is prepared for the us-east-1 region (s3.amazonaws.com
endpoint), but then fails when the DNS resolution points to a
us-west-2 endpoint.

Bucket-in-path works around this for the GetBucketLocation requests.
That means that every GetBucketLocation request will be of the form:
https://s3.amazonaws.com/{bucket}?location. This ensures that jclouds
requests will not be subjected to Amazon's routing/DNS pointers.

Fixes: JCLOUDS-1213
You can view, comment on, or merge this pull request online at:


-- Commit Summary --

  * GetBucketLocation should use path-style requests.

-- File Changes --

    M apis/s3/src/main/java/org/jclouds/s3/S3Client.java (4)
    M providers/aws-s3/src/test/java/org/jclouds/aws/s3/AWSS3ClientExpectTest.java (5)
    M providers/aws-s3/src/test/java/org/jclouds/aws/s3/AWSS3ClientTest.java (10)

-- Patch Links --


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:

View raw message