Repository navigation
test(mux-h2): pin that a trailer after the reset of a 204 carrying DATA is ignored - #1807
Merged
Merged
Conversation
…TA is ignored The CHANGELOG entry and LIFECYCLE.md section 8.4 for #1772 said that a trailer HEADERS frame a backend sends after the PROTOCOL_ERROR reset of a 204 or a 304 answers GOAWAY(STREAM_CLOSED) for the whole backend connection until #1784 lands. That PR is merged, and the statement was never exact: on 2ce0724, the #1775 head before #1784, a trailer in one HEADERS frame was already ignored by the reset-stream branches from #1753. What failed was a trailer block split over a CONTINUATION frame, whose CONTINUATION was answered GOAWAY(PROTOCOL_ERROR). a_trailer_after_the_reset_of_a_204_carrying_data_is_ignored drives a 204 without END_STREAM, DATA without END_STREAM (reset with PROTOCOL_ERROR), then the trailer block in one frame and split, and asserts no GOAWAY, no RST_STREAM and a live backend connection. Its split row is red on 2ce0724 and red on this branch with the pending_discarded_block store in ConnectionH2::handle_read removed. The CHANGELOG entry and LIFECYCLE.md now describe the current behaviour and what changed with #1784. Signed-off-by: Florentin Dubois <[email protected]>
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.
The CHANGELOG entry and
lib/src/protocol/mux/LIFECYCLE.md§8.4 from #1775 said that a trailer HEADERS frame a backend sends after the PROTOCOL_ERROR reset of a 204 or a 304 answers GOAWAY(STREAM_CLOSED) for the whole backend connection "until #1784 lands". #1784 is merged, so this PR checks that claim and rewrites the text.What the test shows:
2ce07244(fix(mux-h2): reset a 204/304 backend stream carrying DATA, discard a HEAD response's DATA #1775's head before fix(mux-h2): spare in-flight frames on a reset stream, discard CONTINUATION of dropped blocks #1784), a trailer in one HEADERS frame was already ignored. The reset-stream branches from fix(mux-h2): answer stream-scoped errors with RST_STREAM instead of GOAWAY #1753 cover it, so the GOAWAY(STREAM_CLOSED) described there did not happen.main, both are ignored (RFC 9113 §5.1) and the backend connection stays up.Test:
a_trailer_after_the_reset_of_a_204_carrying_data_is_ignored(lib/src/protocol/mux/h2.rs). It sends a 204 without END_STREAM, then DATA without END_STREAM, which is reset with PROTOCOL_ERROR. Then it sends the trailer block, once in one frame and once split over a CONTINUATION frame. For both, it asserts no GOAWAY, no RST_STREAM, and that the backend connection is still inH2State::Header.2ce07244:split=true: ... got [(7, 0, 0, [0, 0, 0, 0, 0, 0, 0, 1])]. The unsplit row passes there.pending_discarded_blockstore inConnectionH2::handle_readremoved, with the same failure.Docs: the CHANGELOG entry for #1772 and
LIFECYCLE.md§8.4 now describe the current behaviour and what changed with #1784, in place of the "until #1784 lands" known limitation.No production code changes.
Commands run:
cargo build --locked --all-features: okcargo clippy --all-features: okcargo test --locked --all-features -p sozu-lib --lib: 1547 passedpython3 .github/scripts/check_doc_citations.py --root .: ok, also with--base origin/maincargo +nightly fmt --all -- --check: okcargo clippy -p sozu-lib --all-targets --all-features -- -D warningsfails only on the existingchunks_exact(13)inh2.rstests, which is already onmain(chunks_exact_to_as_chunks, local clippy 1.99). This PR doesn't touch it.