Skip to content

fix(http2): keep connection open after rejecting CONNECT - #4235

Merged
seanmonstar merged 1 commit into
hyperium:masterfrom
shuvroroy:fix/http2-connect-stream-reset
Nov 13, 2026
Merged

seanmonstar merged 1 commit into
hyperium:masterfrom
shuvroroy:fix/http2-connect-stream-reset

Conversation

@shuvroroy

@shuvroroy shuvroroy commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

A CONNECT request with nonzero Content-Length currently resets its stream and then exits the HTTP/2 server loop. That closes the entire connection and interrupts unrelated requests.

Continue accepting streams after sending the existing INTERNAL_ERROR reset. The regression test holds a GET open while CONNECT is rejected, verifies the reset, and checks that both the pending GET and a subsequent GET complete on the same connection.

Validation:

  • The regression test fails before the fix and passes afterward.
  • cargo test --features full: 329 passed, 10 ignored.
  • cargo clippy --features full -- -D warnings: passed.
  • Repository-wide rustfmt --check --edition 2021: passed.
  • cargo check --no-default-features --features server,http2: passed.

This draft description was generated with AI assistance. The human-authorship checkbox remains unchecked pending a human rewrite.

Continue accepting streams after resetting a CONNECT request with a
nonzero Content-Length. Returning from the server loop closes the entire
HTTP/2 connection and interrupts unrelated requests.

Add a regression test that keeps a GET in flight during the reset and
then sends another GET over the same connection.
@shuvroroy
shuvroroy marked this pull request as ready for review October 18, 2026 10:08

@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.

Thanks!

@seanmonstar
seanmonstar merged commit 88520c3 into hyperium:master Nov 13, 2026
26 of 27 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.

2 participants