Add support for HTTP/1 upgrades to h2
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
SETTINGSframe 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) -> Stringor something could allow someone to send theHTTP2-Settingsheader. - For decoding, perhaps it could be part of a new handshake method on the
server::Builder:builder.handshake_upgrade(io, base64settings)
- Perhaps for encoding, this could just be part of the
- A way to tell the client and server that the stream
1is half-closed, and a response is expected.- The client could also get a
handshake_upgrademethod that returns a triple of(Connection, SendRequest, ResponseFuture). - The suggested
handshake_upgradefor the server could return a(Connection, SendResponse).
- The client could also get a
Relevant part of the spec: http://httpwg.org/specs/rfc7540.html#discover-http
Just for my own reference, the upgrade initiator would be https://github.com/hyperium/hyper/issues/1395 on hyper side, right?
@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.