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

aws/signer/v4: Fix signer to not double sign Content-Length header #1743

Merged
merged 3 commits into from Jun 29, 2022

Conversation

jasdel
Copy link
Contributor

@jasdel jasdel commented Jun 29, 2022

Fixes the SDK's AWS SigV4 signer to not double sign the content-length header. If the Content-Length header was manually set on the http.Request, that value would be included along with the Request.ContentLength value as a common separated list when computing the string to sign.

This fix updates the signer to always ignore the content-length header, and only use the Request.ContentLength parameter. This change also matches http.Request's behavior of ignoring the Content-Length header if set.

Fixes #1728
Replaces: #1729

@jasdel jasdel merged commit 09372e1 into aws:main Jun 29, 2022
@jasdel jasdel deleted the pr1729/FixDoubleContentLength branch June 29, 2022 17:02
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.

V4 Signer incorrect behavior when ContentLength already set
2 participants