What if an HTTP/1.1 client talk to an HTTP/2 only server and what if an HTTP/2 client talk to an HTTP/1.1 only server?

前端 未结 3 738
猫巷女王i
猫巷女王i 2020-12-17 23:15

HTTP/2 is definitely the future trend because it is now the standard of HTTP protocol. As we can see in Can I use, 70.15 percent of browsers support the HTTP/2. But HTTP/2 i

3条回答
  •  眼角桃花
    2020-12-17 23:43

    I've tried to visit a http2 only server with curl --http1.1 -i, here is what I got

    HTTP/1.0 403 Forbidden
    Content-Type: text/plain
    
    Unknown ALPN Protocol, expected `h2` to be available.
    If this is a HTTP request: The server was not configured with the `allowHTTP1` option or a listener for the `unknownProtocol` event.
    

提交回复
热议问题