Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #581 +/- ##
==========================================
- Coverage 79.84% 79.73% -0.11%
==========================================
Files 28 28
Lines 12105 12154 +49
==========================================
+ Hits 9665 9691 +26
- Misses 2440 2463 +23 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
azkrishpy
force-pushed
the
todo/h2-request-validation
branch
from
September 8, 2026 21:44
27dc0b0 to
6fedc8b
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.
Issue #, if available: N/A
Description of changes:
Implements the HTTP/2 request validation the decoder carried TODOs for:
:methodmust be present and a valid token, non-CONNECT requests need:schemeand:path, CONNECT needs:authorityand must omit the other two, header values must not contain prohibited characters or padding whitespace, andTEmay only betrailers. All are stream errors rather than connection errors, so the HPACK table stays intact and only the offending stream resets.On the send path,
make_requestnow rejects a message with no:methodor:pathup front rather than failing opaquely later, and logs both.Reuses the existing
INVALID_METHOD/INVALID_PATHerrors rather than adding a public error code. The dynamic-table-resize TODO stays open, since it is not implemented.Why this is a
fixand not part of the TODO-cleanup chore: the header-value check runs on every block, including responses. A response header with a padded value such asx-foo: barused to be delivered to the caller, and now resets the stream withAWS_ERROR_HTTP_PROTOCOL_ERROR. Any peer that pads a value turns a working request into a failure. RFC-9113 8.2.1 only says implementations SHOULD reject these, so this is a deliberate correctness-over-interop choice rather than a no-op cleanup.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.