Skip to content

Add APIs to allow switching an HTTP1 connection to HTTP2 if H2 preface is seen#3996

Open
pborzenkov wants to merge 2 commits intohyperium:masterfrom
pborzenkov:upgradeable-into-parts
Open

Add APIs to allow switching an HTTP1 connection to HTTP2 if H2 preface is seen#3996
pborzenkov wants to merge 2 commits intohyperium:masterfrom
pborzenkov:upgradeable-into-parts

Conversation

@pborzenkov
Copy link
Contributor

This PR adds APIs to allows switching an HTTP1 connection to an HTTP2 connection
by a server that supports both, like hyper_util::server::conn::auto. Notably,
this is required to implement #3962.

The method returns true if the underlying error is a parse error caused
by HTTP2 preface sent over an HTTP1 connection.
This allows the connection to be deconstructed into I/O object and
some additional information, provided it hasn't yet been upgraded.
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