Skip to content

Stop adding Content-Length: 0 to CRT GetObject requests - #10830

Open
hssyoo wants to merge 1 commit into
v2from
crt-zero-content-len
Open

hssyoo wants to merge 1 commit into
v2from
crt-zero-content-len

Conversation

@hssyoo

@hssyoo hssyoo commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Should fix:

The CRT request serializer added "Content-Length: 0" to any request botocore left without a Content-Length and a body. Botocore already sets Content-Length on every non-GET/HEAD/OPTIONS request, so this only ever touched GetObject. aws-c-s3 treats a missing Content-Length as zero for GET_OBJECT and DEFAULT meta requests, and copies the initial headers onto every part GET and its HEAD, so the header only added a signed "content-length" to each of those requests.

Not immediately clear why this was originally added, but there weren't any observed regressions when testing against live S3 after removing. CRT team also confirmed CRT shouldn't need it.
History:

@hssyoo
hssyoo requested a review from a team as a code owner October 30, 2026 18:59

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants