HTTP/2 support
- https://http2.github.io/
- http://www.se-radio.net/2015/07/episode-232-mark-nottingham-on-http2/
Added a nice podcast about HTTP2
Making some notes as I go through the spec...
Section 3 describes the 3 ways a client/server can establish an HTTP/2 connection:
3.2 Starting HTTP/2 for "http" URIs
This uses the HTTP/1.1 Upgrade mechanism to switch from HTTP/1.1 to HTTP/2 mid-connection. This seems like the most complicated setup from the server perspective because it has to "talk" both HTTP/1.1 and HTTP/2 over the same connection.
3.3 Starting HTTP/2 for "https" URIs
The spec requires that HTTP/2 of TLS must negotiate the protocol using the TLS ALPN extension.
The SslStream API used by the Suave DefaultTlsProvider does not provide ALPN support at this time: https://github.com/dotnet/corefx/issues/4721
The OpenSSL TLS provider in Suave does not look like it has ALPN support, but it may be possible to build it on top of OpenSSL APIs. https://www.openssl.org/docs/manmaster/ssl/SSL_set_alpn_protos.html
3.4 Starting HTTP/2 with Prior Knowledge
If the client knows that the server supports HTTP/2 through outside means, it can immediately start talking the protocol through a clear-text TCP connection.
This should be the most straight-forward to implement for a server, as it could listen on a port specifically intended for HTTP/2 connections.
The spec only supports this method of protocol version identification for clear-text connections, and not for HTTP/2 over TLS.