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

100-continue handled incorrectly #3124

Closed dbrumley closed 4 months ago

dbrumley commented 4 months ago

Describe the bug

From RFC: https://tools.ietf.org/html/rfc7231#section-5.1.1 Requirement for clients:

The current code always returns true, even with an empty message body.

Expected Behavior

Change to self._expect_header_set = headers.get('Content-Length') != '0'

Current Behavior

botocore will incorrectly generate a 100-continuation.

Reproduction Steps

Had this bug with minio. I don't have a repro local, but did cite the RFC.

Possible Solution

I'll submit a PR. It's a simple change.

Additional Information/Context

No response

SDK version used

develop

Environment details (OS name and version, etc.)

macos, python 3.9

SamRemis commented 4 months ago

Thank you for bringing this to our attention

We have had this issue reported a number of times; one of the boto maintainers gave an in depth explanation of the complexity of the issue here. We currently have an open PR for an experimental opt in header to solve this issue.

github-actions[bot] commented 4 months ago

This issue is now closed. Comments on closed issues are hard for our team to see. If you need more assistance, please open a new issue that references this one.