RE: #385: HTTP2 Upgrade / Negotiation

> On the other hand, the Upgrade-based negotiation is pessimistic; it assume
> that something will go wrong until we prove that both ends speak the same
> language. It'll be fast but have some limitations at the start (as discussed).

I've been thinking about this, and think we may be able to make it more optimistic after the first exchange.

This is the scenario:
1. client has no prior knowledge whether this server supports http2 on this port in the clear.
2. client performs Upgrade (presumably, he'd be using NPN if over SSL)
3. server sends 101 back.
4. they now speak http2, and the client learns that this server speaks http2 at this port.
5. time passes, and this http2 connection goes away.
6. a subsequent message from client to server (without a pre-existing http2 connection) could bypass the Upgrade and send http2 frames directly.

This would require the server to be able to detect if any given message is either http 1.X or http 2. Given the binary framing of the latter, it seems possible to figure out how to make this unambiguous at the server.

Comments?

Gabriel

Received on Thursday, 25 October 2012 07:03:22 UTC