Skip to content

fix: preserve received END_STREAM across HTTP/2 stream resets - #922

Merged
seanmonstar merged 3 commits into
hyperium:masterfrom
howardjohn:h2/keep-end-stream-headers
Jul 28, 2026
Merged

fix: preserve received END_STREAM across HTTP/2 stream resets#922
seanmonstar merged 3 commits into
hyperium:masterfrom
howardjohn:h2/keep-end-stream-headers

Conversation

@howardjohn

Copy link
Copy Markdown
Contributor

Keep resets received after EOS distinct from ordinary stream errors. This allows the receive half to remain complete while the send half still observes the reset and its reason.

This fixes header-only responses followed by RST_STREAM(NO_ERROR), which could otherwise lose their END_STREAM state when passed through a proxy.

Fixes hyperium/hyper#4130

Keep resets received after EOS distinct from ordinary stream errors. This
allows the receive half to remain complete while the send half still
observes the reset and its reason.

This fixes header-only responses followed by RST_STREAM(NO_ERROR), which
could otherwise lose their END_STREAM state when passed through a proxy.
@seanmonstar

Copy link
Copy Markdown
Member

Could we add an integration test, maybe stream_states or so?

Comment thread tests/h2-tests/tests/stream_states.rs Outdated

@seanmonstar seanmonstar left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@seanmonstar
seanmonstar merged commit a823490 into hyperium:master Jul 28, 2026
6 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.

HTTP/2 proxy loses END_STREAM on early header-only response

2 participants