tustvold opened a new issue, #224: URL: https://github.com/apache/arrow-rs-object-store/issues/224
**Describe the bug** <!-- A clear and concise description of what the bug is. --> S3 appears to have a somewhat perverse behaviour when a request is made to a bucket in the wrong region, specifically it returns a 301 redirect missing a LOCATION header. FWIW this appears to be in contravention of the HTTP specification - https://www.rfc-editor.org/rfc/rfc2616#section-10.3.2. As this is missing a LOCATION header, it fails to trigger the redirect logic [here](https://github.com/seanmonstar/reqwest/blob/master/src/async_impl/client.rs#L1944) which causes it to consider this a "valid" request. I'm not sure can be considered an upstream bug, as for its purposes it is unclear what the correct behaviour for redirects that aren't actually redirects is :sweat_smile:. [reqwest::error_for_status_by_ref](https://docs.rs/reqwest/latest/reqwest/struct.Response.html#method.error_for_status_ref) then treats this response as not an error. Normally failed redirects would result in an error higher up, but as this response lacks a LOCATION header, reqwest doesn't consider it a well-formed redirect The result is that: * Requests with no response body will "succeed" - despite not doing anything * Requests with a response body will likely fail to parse correctly **To Reproduce** <!-- Steps to reproduce the behavior: --> Configure an S3 integration test with the wrong region **Expected behavior** <!-- A clear and concise description of what you expected to happen. --> We should return an error clearly indicating what has gone wrong **Additional context** <!-- Add any other context about the problem here. --> -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
