Skip to content

get_bucket_policy in 1.52.1 results in Seahorse::Client::NetworkingError Empty or incomplete response body #3043

@carolinebeauchamp

Description

@carolinebeauchamp

Describe the bug

My test scripts were failing, with a seahorse networking error when the same scripts worked a few weeks ago.
The offending method is: get_bucket_policy. Reverted back to 1.51.0 and it worked.
D, [2024-06-12T16:15:55.573885 #88512] DEBUG -- : [Aws::S3::Client 500 2.461562 3 retries] get_bucket_policy(bucket:"examplebucket") Seahorse::Client::NetworkingError Empty or incomplete response body

Expected Behavior

Expected it to get the bucket policy without error

Current Behavior

Calling get_bucket_policy results in the following error
D, [2024-06-12T16:15:55.573885 #88512] DEBUG -- : [Aws::S3::Client 500 2.461562 3 retries] get_bucket_policy(bucket:"examplebucket") Seahorse::Client::NetworkingError Empty or incomplete response body

Reproduction Steps

test script


require 'aws-sdk-s3'
require 'logger'
logger = Logger.new(STDOUT)
client = Aws::S3::Client.new(  logger: logger,
                               log_level: :debug,
                               region: "<bucketregion>"
)

resp = client.get_bucket_policy({
                                   bucket: "examplebucket",
                                 })

puts resp.to_h```

### Possible Solution

This PR https://github.com/aws/aws-sdk-ruby/pull/3040 has made changes in how responses are handled, and may have introduced something which breaks the response from get_bucket_policy

### Additional Information/Context

_No response_

### Gem name ('aws-sdk', 'aws-sdk-resources' or service gems like 'aws-sdk-s3') and its version

aws-sdk-s3

### Environment details (Version of Ruby, OS environment)

ruby 3.2 on MacOS and Debian ruby container

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugThis issue is a bug.investigatingIssue is being investigated

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions