Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #582 +/- ##
==========================================
+ Coverage 79.84% 80.13% +0.29%
==========================================
Files 28 28
Lines 12105 12117 +12
==========================================
+ Hits 9665 9710 +45
+ Misses 2440 2407 -33 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
azkrishpy
commented
Sep 11, 2026
| /* The largest dynamic table this implementation will allocate, whatever the peer's | ||
| * SETTINGS_HEADER_TABLE_SIZE says. A macro so both hpack.c and hpack_encoder.c can use it | ||
| * without exporting a new symbol. */ | ||
| #define AWS_HPACK_MAX_DYNAMIC_TABLE_SIZE (16 * 1024 * 1024) |
Contributor
Author
There was a problem hiding this comment.
This is a guess there can probably be lower. Please leave a comment if you have a better estimate on what the lower number should be.
TingDaoK
approved these changes
Sep 11, 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.
Issue #, if available: N/A
Description of changes:
Two HPACK conformance problems, both from TODOs left in the code.
The encoder took the peer's
SETTINGS_HEADER_TABLE_SIZEat face value and passed it straight through as the requested table size. Anything above the 16MB this implementation supports is rejected outright, so a peer advertising a larger table made every resize fail, and with it every header block we tried to send. The value is now clamped to the supported ceiling, which RFC-7541 4.2 allows since the peer's number is a limit we may use, not one we must.The decoder did not check the padding bits at the end of a Huffman-coded string. RFC-7541 5.2 requires padding to be the most significant bits of the EOS symbol and shorter than 8 bits, and says anything else MUST be treated as a decoding error. Both conditions are now enforced.
Worth knowing on review: the padding check rejects strings that previously decoded, and any HPACK failure becomes a connection error, so a peer that pads incorrectly now loses the whole connection rather than one stream. That is what the spec asks for, but the blast radius is the connection.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.