Repository navigation
fix(http2): preserve empty header continuation sequences - #28
Merged
Merged
Conversation
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.
An HTTP/2 response can start with a HEADERS frame containing no HPACK bytes and finish in CONTINUATION frames. The client used a nonempty buffer as its continuation state, so it rejected these valid responses. The same gap allowed an interleaved DATA END_STREAM to count an invalid response as a success.
Track the unfinished field block with its existing stream ID, clear that state at END_HEADERS, and reject HEADERS on stream zero. Preserve the original END_STREAM flag and reuse the header buffer without adding connection fields or allocations. Regression tests cover empty, padding-only and priority-only fragments; empty continuations and trailers; every transport cut; wrong streams, interleaving and EOF; TCP/TLS request accounting and reconnects.
Validation:
HTTP/2 field-block sequencing rules. Required hosted CI includes debug/release tests and the existing Docker interoperability suite.