Skip to content

fix: Reject frames on streams whose HEADERS haven't been sent#899

Open
ArniDagur wants to merge 1 commit intohyperium:masterfrom
ArniDagur:fix/reject-frames-on-pending-open-stream
Open

fix: Reject frames on streams whose HEADERS haven't been sent#899
ArniDagur wants to merge 1 commit intohyperium:masterfrom
ArniDagur:fix/reject-frames-on-pending-open-stream

Conversation

@ArniDagur
Copy link
Copy Markdown
Contributor

When the max number of concurrent streams is reached and a stream is queued, the HEADERS haven't been transmitted yet. From the peer's perspective the stream is idle. RST_STREAM, WINDOW_UPDATE, and HEADERS targeting this stream are connection errors per RFC 9113 section 5.1: https://www.rfc-editor.org/rfc/rfc9113.html#section-5.1-7.2.4

Receiving any frame other than HEADERS or PRIORITY on a stream in [idle] state MUST be treated as a connection error of type PROTOCOL_ERROR.

DATA is already caught, so no additional check is needed there (although I include it in my test anyway).

The reason for rejecting this besides RFC conformance is that you can get into some weird states without this check.

@ArniDagur ArniDagur force-pushed the fix/reject-frames-on-pending-open-stream branch 3 times, most recently from 97c9b05 to dd72a80 Compare May 3, 2026 02:12
When the max number of concurrent streams is reached and a stream is queued, the HEADERS haven't been transmitted yet. From the peer's perspective the stream is idle. RST_STREAM, WINDOW_UPDATE, and HEADERS targeting this stream are connection errors per RFC 9113 section 5.1: https://www.rfc-editor.org/rfc/rfc9113.html#section-5.1-7.2.4

> Receiving any frame other than HEADERS or PRIORITY on a stream in [idle] state MUST be treated as a connection error of type PROTOCOL_ERROR.

DATA is already caught, so no additional check is needed there (although I include it in my test anyway).

The reason for rejecting this besides RFC conformance is that you can get into some weird states without this check.
@ArniDagur ArniDagur force-pushed the fix/reject-frames-on-pending-open-stream branch from dd72a80 to f98c021 Compare May 3, 2026 02:22
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