S3 Permanent Redirect (Question or Issue, not sure) #1151
Closed
Description
So, I wanted to test my region redirect handling for S3. Wasn't really sure how to write a test for it. So I created a bucket in us-west-2 but disable cross region replication. Then I attempted to get the object from us-east-1 and couldn't get the AuthorizationHeaderMalformed
exception to test my handler. So I tried a fetch from us-west-1 and was able to get the expected error code. But the error message was weird:
The bucket is in this region: null. Please use this region to retry the request
Seems like this shouldn't be null for a 301. You can see below that the bucket region is in the response headers, so why isn't it present at e.getAdditionalDetails().get(Headers.S3_BUCKET_REGION)
? It's null there but present in the headers. Hmph.
Check out this screen shot, available in the header but not in additional details.