Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed the following issue: s3 = Aws::S3::Resource.new(region: 'us-west-1') s3.bucket('us-west-2-bucket-you-dont-own').exists? #=> raises Aws::S3::Errors::BadRequest If the bucket exists, but you are configured for the incorrect region, the SDK fails to extract the actual bucket region from the 400 response. This is due to the fact that HEAD reponses do not have a body. Added a check for the "x-amz-bucket-region" header before checking the body. This the SDK to determine the proper signing region for the request. This change currently lacks tests. See #1161
- Loading branch information