HTTP/2 support #300
Description
Now that we are set with ALPN support, shouldn't have any roadblock that would impede HTTP/2 support. The good news is that the hacked ALPN support mentioned in issue #293 should also work cross platform since we are not doing any kind of reflection or native calls. I haven't read the spec complete, but few open source implementations of both server and client seem to be available. So we can perhaps reuse them. Some links below.
- http://httpwg.org/specs/rfc7540.html (Spec)
- https://github.com/Matthias247/http2dotnet (which claim to have a complete implementation of server & client in C#) and has MIT license.
I am not going to work on this in immediate future. But if anybody is interested this is up for grab. Doesn't necessarily need to implement a fully functional PR, bugs are expected and PRs with phase by phase progressions are welcome. Whatever work on this we will be doing a beta first. We should try to isolate the HTTP/2 handlers from current Request/Response handlers since it a totally different protocol from whatever I read. There are different scenarios we would probably need to handle. These scenarios should work for both SSL and non-SSL connections. When SSL is used HTTP/2 can be negotiated via ALPN, while for non-SSL connections HTTP/2 is done by upgrade headers mentioned in spec.
- Client to proxy HTTP 1.1 => Proxy to server HTTP/2
- Client to proxy HTTP 1.1 or below => Proxy to Server HTTP 1.1 or below (which is already implemented)
- Client to proxy HTTP/2 => Proxy to server HTTP 1.1
- Client to proxy HTTP/2 => Proxy to server HTTP/2
For now the 4th option would be a good start.