You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@jclouds.apache.org by Timur Alperovich <no...@github.com> on 2017/01/12 02:21:00 UTC

[jclouds/jclouds] GetBucketLocation should use path-style requests. (#1052)

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:

  https://github.com/jclouds/jclouds/pull/1052

-- 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 --

https://github.com/jclouds/jclouds/pull/1052.patch
https://github.com/jclouds/jclouds/pull/1052.diff

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/1052

Re: [jclouds/jclouds] GetBucketLocation should use path-style requests. (#1052)

Posted by Andrew Gaul <no...@github.com>.
I could not verify the original symptoms but the fix makes sense and passes integration tests against AWS S3 and DreamObjects.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/1052#issuecomment-272090491