Repository navigation
Add HTTP request-parsing edge-case tests - #14
Merged
Merged
Conversation
mattsva
force-pushed
the
test/http-edge-cases
branch
2 times, most recently
from
October 11, 2026 13:37
5686722 to
9f5d206
Compare
Covers duplicate Content-Length (400), Content-Length with Transfer-Encoding (501), bare LF line endings, obs-fold continuations, Expect: 100-continue, negative/overflowing/non-numeric Content-Length (400/413/400), a version-less request line, a space before a header colon, and pipelined requests. No source changes were needed: every case already behaves correctly. The tests document the behavior and guard it, including the two deliberately lenient choices (obs-fold and a version-less request line are served rather than rejected, per the existing lenient policy). Wired into Make, CMake, Meson and the CI jobs.
mattsva
force-pushed
the
test/http-edge-cases
branch
from
October 11, 2026 13:45
9f5d206 to
b58b553
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.
No linked issue — the audit verdict for these parsing edge cases was NOT PRESENT (the parser already handles them correctly). This PR locks the behaviour in with tests rather than changing code.
Covers: duplicate Content-Length with different values (→ 400), Content-Length + Transfer-Encoding (→ 501), bare LF and obs-fold continuation lines,
Expect: 100-continue, negative/overflowing/non-numeric Content-Length (→ 400/413), request line without HTTP version, spaces before the colon, and pipelined requests. 11 checks, all passing against the current parser.Two deliberate lenient behaviours — bare LF accepted, version-less request line served — are documented in the test rather than changed. Wired into Make, CMake, Meson and CI.
Stacked on the previous PR in the series; merge in order.