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

Fixed transfer-encoding for empty chunked payload #1536

Merged
merged 1 commit into from
Apr 12, 2023

Conversation

asaio001
Copy link
Contributor

In release v1.32.0, there was a backwards incompatible change introduced as a (seemingly unintended) side-effect of adding trailer support.

The relevant scenario is in the case of a chunk-encoded request containing only a terminating chunk as its body payload (0/r/n/r/n). Previously, the content length would be set to the length of the body (0, in this case) whereas afterwards it stopped doing that for chunked transfers.

The consequence of this for the above scenario is that the Transfer-Encoding: chunked header that would previously have been removed (when setting the CL) persists. If this request is then (re)used, it will result in a desync, since the header will be sent with no body at all.

@erikdubbelboer erikdubbelboer merged commit d76662b into valyala:master Apr 12, 2023
14 checks passed
@erikdubbelboer
Copy link
Collaborator

Thanks!

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.

None yet

2 participants