On 6/5/2015 10:11 PM, Simone Bordet wrote: > On Fri, Jun 5, 2015 at 2:36 PM, Xuelei Fan <xuelei....@oracle.com> wrote: >> > See more inlines, please. >> > >> > Please help on one question I'm not sure of. Per HTTP/2 specification, >> > Does H2 server allow fallback to HTTP/1.1 if client requests a HTTP/2 >> > connection? I did not find the answer from RFC 7540. > Yes. > The intended behavior is exactly to fall back to http/1.1 if h2 cannot > be negotiated. > > This is implicitly explained in the ALPN spec, RFC 7301, see > http://tools.ietf.org/html/rfc7301#section-3.2. > This section says:
"It is expected that a server will have a list of protocols that it supports, in preference order, and will only select a protocol if the client supports it." I may have different understanding. If server support H2, H2 should be used. No fallback is expected. Support does not means the protocol must work in any cases. Fallback to use HTTP/1.1 should be a spec of HTTP/2, rather than TLS protocols. I would like to see an evidence in HTTP/2 spec that H2 server allow fallback to HTTP/1.1. >> > In TLS, if client requests to negotiate TLS v1.2, and server supports >> > TLS 1.2, it is not allowed to fallback to TLS v1.1. If there is not >> > suitable cipher suite to negotiate TLS 1.2, the connection would be >> > terminated immediately. I'm not sure what's the spec for HTTP/2, >> > HTTP/1.1 and HTTP/1.0. > HTTP/2 does not behave like TLS in this sense. > > ALPN is for *application* protocol selection. > A client can send: > > ["h2", "spdy/3.1", "http/1.1"] > > Failing h2, spdy/3.1 is attempted, which is a completely different > protocol, with different restrictions, etc. > "Failing" is confusing. Support does not means the protocol must work in any cases. But failing means that. I would use "support" for the description as what RFC 7301 does. If H2 is not supported, SPDY/3.1 would be attempted, of SPDY/3.1 is not supported HTTP/1.1 would be attempted. If H2 is supported in both side, but H2 does not work, it is a H2 problem that need to be addressed in H2 layer. No application protocol fallback in TLS layer if the application protocol is supported. I understand your concerns now. I think we have different understanding of the ALPN protocols. It's a good thing to understand the actually requirements of the industry, I think. Thank you! Xuelei