http1: revert version→505 (llhttp errno ambiguous, net-negative)#54
Merged
Conversation
Mapping HPE_INVALID_VERSION → 505 was net-negative: llhttp returns that same errno for BOTH a valid-but-unsupported version (HTTP/1.2) AND a malformed version string (missing minor, leading zeros, whitespace, bare-LF request line). Http11Probe wants 400 for the malformed cases (3 Must + 1 May), so 505-for-all turned 4 passing checks into failures to "fix" one May-level check (COMP-HTTP12-VERSION). They are indistinguishable from the errno alone. Revert to the generic 400. COMP-HTTP12-VERSION stays a (May) miss — the probe accepts our 400 as "request rejected". h1/020 http12 back to 400. tests/phpt 202/202.
Contributor
CoverageTotal lines: 80.80% → 80.66% (-0.14 pp)
|
This was referenced May 29, 2026
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.
The earlier
HPE_INVALID_VERSION → 505change (#53) was net-negative and is reverted.llhttp reports the same
HPE_INVALID_VERSIONfor two different things:HTTP/1.2) — Http11Probe wants 200 or 505HTTP/1missing minor,HTTP/01.1leading zeros, version whitespace, bare-LF request line) — the probe wants 400They're indistinguishable from the errno, so mapping all to 505 turned 4 passing checks into failures (
COMP-VERSION-MISSING-MINOR/LEADING-ZEROS/WHITESPACE— Must;RFC9112-2.2-BARE-LF— May) to satisfy one May-level check (COMP-HTTP12-VERSION). The probe re-run confirmed it: 155 → 157 with the wrong 4 now red.Revert to generic 400.
COMP-HTTP12-VERSIONstays a May-level miss (probe accepts 400 as "rejected"); the 4 malformed-version checks pass again.h1/020http12 expectation back to 400. tests/phpt 202/202.