Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for HTTP/1 upgrades to h2 #220

Open
seanmonstar opened this issue Jan 29, 2018 · 3 comments
Open

Add support for HTTP/1 upgrades to h2 #220

seanmonstar opened this issue Jan 29, 2018 · 3 comments

Comments

@seanmonstar
Copy link
Member

I'm not saying doing the HTTP/1 parts of the upgrade, but after someone has started an upgrade, there is no way to tell h2 to continue with it.

  • A way to encode and decode a SETTINGS frame as base64url.
    • Perhaps for encoding, this could just be part of the client::Builder. With some settings set on the builder, builder.as_base64(&self) -> String or something could allow someone to send the HTTP2-Settings header.
    • For decoding, perhaps it could be part of a new handshake method on the server::Builder: builder.handshake_upgrade(io, base64settings)
  • A way to tell the client and server that the stream 1 is half-closed, and a response is expected.
    • The client could also get a handshake_upgrade method that returns a triple of (Connection, SendRequest, ResponseFuture).
    • The suggested handshake_upgrade for the server could return a (Connection, SendResponse).
@seanmonstar
Copy link
Member Author

Relevant part of the spec: http://httpwg.org/specs/rfc7540.html#discover-http

@lucab
Copy link
Contributor

lucab commented Feb 6, 2018

Just for my own reference, the upgrade initiator would be hyperium/hyper#1395 on hyper side, right?

@seanmonstar
Copy link
Member Author

@lucab probably not that issue specifically in hyper, but for h2, it wouldn't matter what created the connection and did the HTTP/1 request and received the 101 response, but after that point, you'd hand the connection to h2.


FWIW, I have been working on this, and am close to a PR.

@nox nox added the enhancement label May 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants