create a bucket "marios-test-bucket.foo" in ap-north-east-1 and then try to access this from a different server endpoint - such as ap-south-east-1, i.e.:
>> response
=> #<Net::HTTPMovedPermanently 301 Moved Permanently readbody=true>
>> response.body
=> "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n
<Error>
<Code>PermanentRedirect</Code>
<Message>The bucket you are attempting to access must be addressed using the specified endpoint. Please send all future requests to this endpoint.</Message>
<RequestId>414883F22C6F5799</RequestId>
<Bucket>marios-test-bucket.foo</Bucket>
<HostId>CkUSF4xXXgrt8/ggfBrEudibTUn6E0tbPHU72k7FhSeeAeTtTMIiWVywFTGilZja</HostId>
<Endpoint>marios-test-bucket.foo.s3-ap-northeast-1.amazonaws.com</Endpoint>
</Error>"
This minor edit grabs the Endpoint from the response and lets the code retry the connection
I noticed that this code was commented out in the first place (from the parser I mean) and was wondering if there was a reason for that (introduced other problems?),
Hi,
please consider this minor edit. The scenario is:
create a bucket "marios-test-bucket.foo" in ap-north-east-1 and then try to access this from a different server endpoint - such as ap-south-east-1, i.e.:
AWS responds with "301 Moved Permanently":
I noticed that this code was commented out in the first place (from the parser I mean) and was wondering if there was a reason for that (introduced other problems?),
thanks for your time, marios