Treat HEAD requests as having no body when length framing is absent#148
Merged
kevinresol merged 1 commit intoJul 13, 2026
Merged
Conversation
Co-authored-by: Cursor <cursoragent@cursor.com>
kevinresol
force-pushed
the
fix/request-nobody-methods
branch
from
July 13, 2026 12:11
1fef66c to
0504bde
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.
When a request has neither Content-Length nor Transfer-Encoding,
IncomingRequest.parsereturned an empty body only forGETandOPTIONSand responded with411 Length Requiredfor everything else.HEADrequests also normally carry no body, so they were incorrectly rejected.Adds
HEADto the set of methods that yield an empty body when no length framing is present. Other methods still get 411 as before. (TRACEis intentionally not added since it is not part of theMethodenum.)Added a
TestHeadercase asserting a bareHEADrequest parses to an empty body instead of failing.Made with Cursor