Prefer chunked Transfer-Encoding over Content-Length#147
Merged
kevinresol merged 1 commit intoJul 13, 2026
Conversation
…uests Co-authored-by: Cursor <cursoragent@cursor.com>
kevinresol
force-pushed
the
fix/te-over-content-length
branch
from
July 13, 2026 12:02
4fb6e1f to
085c6c0
Compare
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.
IncomingRequest.parseframed the request body by Content-Length whenever that header was present, even if a chunkedTransfer-Encodingwas also present. Per RFC 7230 §3.3.3, if a message hasTransfer-Encoding: chunkedthe Content-Length must be ignored and the body decoded as chunked.Transfer-Encodingincludeschunked.chunkedtransfer-coding token case-insensitively (both in the Content-Length and no-length branches).Added a
TestHeadercase asserting that a request with bothContent-LengthandTransfer-Encoding: Chunkeddecodes the chunked body.Made with Cursor