Repository navigation
Require an absolute :path in HTTP/2 requests - #1484
Merged
Merged
Conversation
quinnj
added a commit
that referenced
this pull request
Oct 22, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
RFC 9113 §8.3.1: :path is the absolute path (and query) of the target, or `*` for an OPTIONS request. The server accepted any value. An empty :path reached the Request constructor, which threw, so the client got RST_STREAM(INTERNAL_ERROR) and the server logged "h2 server could not send the response" for a malformed request. A :path such as "abc" was served, though HTTP/1 answers the same target with 400. Both are now malformed requests, rejected like the other invalid pseudo-headers. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
quinnj
force-pushed
the
claude/h2-path-validation
branch
from
October 22, 2026 09:01
dbea3da to
bb40914
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1484 +/- ##
==========================================
+ Coverage 91.58% 91.60% +0.01%
==========================================
Files 31 31
Lines 13051 13053 +2
==========================================
+ Hits 11953 11957 +4
+ Misses 1098 1096 -2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
# Conflicts: # CHANGELOG.md
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.
RFC 9113 §8.3.1:
:pathcarries the absolute path (and query) of the request target, or*for an OPTIONS request. The HTTP/2 server accepted any:path::pathreached theRequestconstructor, which threwArgumentError("target must not be empty"). The client gotRST_STREAM(INTERNAL_ERROR), and the server loggedh2 server could not send the responseat Error level. Any client could add an error record that way.:pathsuch asabcorhttp://example.com/was passed to the handler. HTTP/1 answers the same request target with 400.Both are now malformed requests, rejected by
_validate_h2_request_headers!like the other invalid pseudo-headers:GOAWAY(PROTOCOL_ERROR), nothing logged.*is accepted only withOPTIONS.Verification
:path,abc, an absolute URI, and*with GET are rejected, and that*with OPTIONS is accepted. On master the four rejections fail.:pathwithRST_STREAM(2)plus one error log and servesabcwith 200. Here both getGOAWAY(PROTOCOL_ERROR)and no log;/okis still served.test/http2_server_tests.jlpass (39/39) on Julia 1.12.Review
:path, which starts with/(or is*forOPTIONS *), and sends no:pathfor CONNECT, so its requests are unaffected.:pathbranch, and CONNECT requests with a:pathwere already rejected.🤖 Generated with Claude Code