Skip to content

test(mux-h2): pin that a trailer after the reset of a 204 carrying DATA is ignored - #1807

Merged
FlorentinDUBOIS merged 1 commit into
mainfrom
docs/h2-bodiless-reset-after-1784
Oct 2, 2026
Merged

FlorentinDUBOIS merged 1 commit into
mainfrom
docs/h2-bodiless-reset-after-1784

Conversation

@FlorentinDUBOIS

Copy link
Copy Markdown
Collaborator

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:

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 in H2State::Header.

  • Red on 2ce07244: split=true: ... got [(7, 0, 0, [0, 0, 0, 0, 0, 0, 0, 1])]. The unsplit row passes there.
  • Red on this branch with the pending_discarded_block store in ConnectionH2::handle_read removed, with the same failure.
  • Green on this branch.

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: ok
  • cargo clippy --all-features: ok
  • cargo test --locked --all-features -p sozu-lib --lib: 1547 passed
  • python3 .github/scripts/check_doc_citations.py --root .: ok, also with --base origin/main
  • cargo +nightly fmt --all -- --check: ok

cargo clippy -p sozu-lib --all-targets --all-features -- -D warnings fails only on the existing chunks_exact(13) in h2.rs tests, which is already on main (chunks_exact_to_as_chunks, local clippy 1.99). This PR doesn't touch it.

…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]>
@FlorentinDUBOIS
FlorentinDUBOIS merged commit b252469 into main Oct 2, 2026
28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant