Skip to content

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

Open
shuvroroy wants to merge 1 commit into
hyperium:masterfrom
shuvroroy:fix/http2-connect-stream-reset
Open

shuvroroy wants to merge 1 commit into
hyperium:masterfrom
shuvroroy:fix/http2-connect-stream-reset

Conversation

@shuvroroy

@shuvroroy shuvroroy commented Oct 18, 2026 •

Copy link
Copy Markdown

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

This branch has not been deployed

No deployments
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