Repository navigation
fix(application): rebuild a cut HTTP/2 frame after the connection preface (#2665) - #2675
Merged
Merged
Conversation
…face (#2665) A frame the capture cuts short after the connection preface rebuilds from HTTPv2.from_data as the preface's first octets. replay_short_read measured its cut from the first octet of the rebuilt data, which the frame header opens only when nothing is ahead of it, and HTTP.pack writes the preface there. - replay_short_read starts the cut where the header starts, past what is written ahead of it: a header cut short has no payload past it, so it ends the rebuilt data. Every other replay still starts at the first octet. - Tests: SETTINGS, DATA, HEADERS and PING frames after the preface, cut at every offset through TCP and through HTTPv2, rebuilt from info, its dict and the HTTP base; each whole frame as the control; and a short-read sweep case. HTTP, HTTP/2, schema, sweep, option, doc-claim, member-order and RFC-constants modules pass; captures parse and rebuild identically to main.
Owner
Author
|
GOOD TO GO at |
JarryShaw
added a commit
that referenced
this pull request
Nov 2, 2026
…TTP/2 and SCTP rebuilds into 1.6.0 (#2449) - Breaking: the IPv4, HOPOPT, IPv6-Opts, IPv6-Route, MH and HIP makers (#2677) raise on a value a field cannot hold, where 1.5.x wrote it masked; a PDM scale past one octet raises where it warned, and MH._decode_signed is removed. The entry gives the old and new values. - Fixed: an SCTP packet cut short of its declared length rebuilds as captured (#2679). - Folded into unreleased entries: a cut HTTP/2 frame after the connection preface rebuilds, into the cut-SETTINGS entry (#2675); IPv4's Quick-Start function and not-used octet refusals, into the Quick-Start entry (#2677). - No entry for the test-only 42a6133. - CHANGELOG.md regenerated; util/changelog_md.py --check passes.
1 of 5 tasks
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.
make pylint,make mypy,make isort)make testpasses, and a test case covers the changeWhat is the purpose of your pull request?
fix— fixes a bugDescription of your pull request and other information
A cut HTTP/2 frame that follows the connection preface rebuilds as captured. Before this,
HTTPv2.from_datareturned the first octets of the preface.replay_short_readcut from the first octet of the rebuilt data, butHTTP.packwrites the 24-octet preface ahead of the frame header.packwrites nothing after the header schema, which holds for every protocol that reaches the replay, and the docstring states the assumption.A Sonnet cross-review returned GOOD TO GO on the code. Instrumenting 196,184 replay calls across all 703 unit-tier modules found a non-zero start only for HTTPv2 after a preface. Of 34,962 trials, the 209 that changed are all preface-plus-cut HTTP/2 rebuilds going from wrong to right. Its docs request, a dead cross-reference, is fixed in this head. #2673 tracks an older SCTP defect the review found.
Closes #2665