Skip to content

h3: put the session's error code on the wire - #62

Merged
mattrobenolt merged 1 commit into
mainfrom
fix/h3-reset-codes
Nov 29, 2026
Merged

mattrobenolt merged 1 commit into
mainfrom
fix/h3-reset-codes

Conversation

@mattrobenolt

Copy link
Copy Markdown
Member

h3spec's ten cases in #41 all say the same thing: a malformed request is reset with application error 0 instead of H3_MESSAGE_ERROR (0x10e).

The session was already right — head.request rejects the fields and queues a reset with H3_MESSAGE_ERROR. The engines threw the code away: a .reset action became stream.shutdown(.both) and a .stop_sending became .recv, and both frames went out with code 0.

baskingspot/quic#10 added Stream.reset(io, code) and Stream.stopSending(io, code). The engines call them with the session's code, and the quic pin moves to that merge.

On verification: quic-io does not expose a received reset code to the caller, so a loopback test cannot see this. The session-level tests already assert the queued code; the end-to-end witness is h3spec, which needs the network to build (0.1.15 from Hackage through just h3spec-build). just ci passes.

Both engines answered a session `.reset` with `stream.shutdown(.both)` and a
`.stop_sending` with `.recv`, which send those frames with application code 0.
A malformed request therefore reached the peer as `H3_NO_ERROR` instead of
`H3_MESSAGE_ERROR`, which is h3spec's ten cases in #41.

`quic#10` added `Stream.reset(io, code)` and `Stream.stopSending(io, code)`;
the engines use them now, with the code the session queued. The quic pin moves
to that commit.

End-to-end verification is h3spec, which needs the network to build; quic-io
does not expose a received reset code to a caller, so no loopback test can see
it.
@mattrobenolt
mattrobenolt merged commit 7bc8e2a into main Nov 29, 2026
7 checks passed
@mattrobenolt
mattrobenolt deleted the fix/h3-reset-codes branch November 29, 2026 05:30
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