Skip to content

h3: test the payload half of the truncation gate - #63

Merged
mattrobenolt merged 1 commit into
mainfrom
h3-payload-split-test
Nov 29, 2026
Merged

mattrobenolt merged 1 commit into
mainfrom
h3-payload-split-test

Conversation

@mattrobenolt

Copy link
Copy Markdown
Member

A test-only follow-up to #51, which merged as 4043c1a.

#51's gate (h3: only a frame at the FIN is a truncation) fails with H3_FRAME_ERROR only when the peer's FIN has arrived and a frame is still cut. Its test cuts the frame header (deferred_len != 0, reader.header == null), which exercises one half of the condition. The other half is a complete header with a missing payload (reader.header != null), which also has to wait rather than fail.

a payload split behind a held section parses when the rest arrives pins it: a blocked head, then a DATA frame with its whole header and none of its payload, then the insert, then the payload. It asserts the stream reports nothing and stays open in between, and that the body arrives once the payload does.

Checked both ways: with the gate ungated (if (stream.deferred_len != 0 or stream.reader.header != null)), this test and #51's header-cut test both fail; with the gate as merged, both pass. just ci is green.

@mattrobenolt
mattrobenolt merged commit 6d86c12 into main Nov 29, 2026
7 checks passed
@mattrobenolt
mattrobenolt deleted the h3-payload-split-test branch November 29, 2026 05:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant