Skip to content

Conversation

@seanmonstar
Copy link
Member

This refactors the way hyper handles HTTP/2 CONNECT / Extended CONNECT. Before, an uninhabited enum was used to try to prevent sending of the Buf type once the STREAM had been upgraded. However, the way it was originally written was incorrect, and will eventually have compilation issues.

The change here is to spawn an extra task and use a channel to bridge the IO operations of the Upgraded object to be Cursor buffers in the new task.

ref: rust-lang/rust#147588
Closes #3966

@seanmonstar seanmonstar requested a review from nox October 24, 2025 20:03
This refactors the way hyper handles HTTP/2 CONNECT / Extended CONNECT. Before,
an uninhabited enum was used to try to prevent sending of the `Buf` type once
the STREAM had been upgraded. However, the way it was originally written was
incorrect, and will eventually have compilation issues.

The change here is to spawn an extra task and use a channel to bridge the IO
operations of the `Upgraded` object to be `Cursor` buffers in the new task.

ref: rust-lang/rust#147588
@seanmonstar
Copy link
Member Author

@nox you originally implemented this, I presume because you needed it in an application. Would you be able to take a look, or even try the branch in your app?

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 Upgraded wrongly uses a transparent uninhabited type

2 participants