Always add Content-Length: 0 even for empty bodies - #917
Closed
onno-vos-dev wants to merge 1 commit into
Closed
Conversation
Owner
|
Thanks @onno-vos-dev for the report and for flagging the AWS regression (aws-beam/aws-elixir#238). I picked this up in #925, done the curl way: an empty body gets Content-Length: 0 only for the body-bearing methods (POST/PUT/PATCH), and using a binary value so it stays type-correct. GET/HEAD/DELETE stay without it. Closing in favor of #925, which covers your case. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I got a report on aws-beam/aws-elixir#238 that the upgrade I recently did to a later version of Hackney broke things for 0-sized bodies. AWS apparently requires a Content-Length being set even for 0-sized bodies.
Instead of implementing a fix on my end, I'm testing the waters to see how open you are to fixing this from within Hackney itself.