boto / botocore

The low-level, core functionality of boto3 and the AWS CLI.
Apache License 2.0
1.44k stars 1.06k forks source link

resolves issue 3124 #3125

Closed dbrumley closed 4 months ago

dbrumley commented 4 months ago

Fix for https://github.com/boto/botocore/issues/3124

We've been maintaining this patch locally in our company for awhile, and just noticed. Figured it's best to get upstream.

SamRemis commented 4 months ago

Hi @dbrumley,

Thank you for the contribution.

I just opened up a PR for an experimental opt in header for exactly this; we are hesitant to make this change the default since customers may be relying on the existing behavior which is fully functional for S3. In the future, this may become the default once we are confident that this is not a breaking change.

The content-length header is also not guaranteed to be present, so making a best-effort check on the length of the body will work for more use cases