Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignore Content-Length header when setting 'chunked' for Transfer-Encoding #3360

Merged
merged 4 commits into from
Jan 31, 2025

Conversation

jonathan343
Copy link
Contributor

@jonathan343 jonathan343 commented Jan 30, 2025

This PR removes the Content-Length header when a request is sent using chunked upload.

See the guidance below from Signature Calculations for the Authorization Header: Transferring Payload in Multiple Chunks for more details

When transferring data in a series of chunks, you must do one of the following:

Explicitly specify the total content length (object length in bytes plus metadata in each chunk) using the Content-Length HTTP header. To do this, you must pre-compute the total length of the payload, including the metadata that you send in each chunk, before starting your request.

Specify the Transfer-Encoding HTTP header. If you include the Transfer-Encoding header and specify any value other than identity, you must omit the Content-Length header.

For all requests, you must include the x-amz-decoded-content-length header, specifying the size of the object in bytes.

@codecov-commenter
Copy link

codecov-commenter commented Jan 30, 2025

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

All modified and coverable lines are covered by tests ✅

Please upload report for BASE (develop@45da16d). Learn more about missing BASE report.
Report is 149 commits behind head on develop.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             develop    #3360   +/-   ##
==========================================
  Coverage           ?   93.13%           
==========================================
  Files              ?       66           
  Lines              ?    14469           
  Branches           ?        0           
==========================================
  Hits               ?    13476           
  Misses             ?      993           
  Partials           ?        0           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@nateprewitt nateprewitt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@jonathan343 jonathan343 merged commit a97cfe9 into boto:develop Jan 31, 2025
40 checks passed
aws-sdk-python-automation added a commit that referenced this pull request Jan 31, 2025
* release-1.36.11:
  Bumping version to 1.36.11
  Update to latest models
  Ignore Content-Length header when setting 'chunked' for Transfer-Encoding (#3360)
hswong3i pushed a commit to alvistack/boto-botocore that referenced this pull request Feb 1, 2025
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.

4 participants