cURL / Mailing Lists / curl-library / Single Mail

curl-library

RE: intent to land: CURL_HTTP_VERSION_2TLS

From: Lucas Pardue <Lucas.Pardue_at_bbc.co.uk>
Date: Fri, 11 Dec 2015 11:47:13 +0000

Yousuke Kimote wrote:
> CURL_HTTP_VERSION_2TLS:
> - HTTP2 is used only on TLS.
> - If HTTP is requested with this new mode, Curl will make a HTTP connection
> automatically.
> - If HTTP2 handshake failed, Curl will try to connect using HTTP (fallback
> action)
>
> Is my understanding right?

The HTTP/2 over TLS handshake should take place via NPN/ALPN. If the server cannot support h2, then a different protocol would be selected. I presume curl will still support HTTP/1.1, and so the fallback would be that protocol. As a worst case, if the application protocol cannot be agreed between client and server, this is a TLS failure (fatal "no_application_protocol" alert) and I would assume that curl would simply report that.

Daniel Stenberg wrote:
> Since HTTP/2 over HTTP adds to the request size and causes extra round-trips when upgrading, it has a higher impact so I think we shouldn't have it by default (at this point in time).

I agree with the extra size (although it is all relative) but are there really additional round-trips?

I've been trying to find the time to look at 'h2c prior knowledge' in curl/libcurl, still some way to go. Prior knowledge avoids upgrade overhead but would need an option to signal usage, I think the new argument creates a pathway for such an option. If it comes to a point of implementation, I don't think h2c prior knowledge should be a default either due to the possibility of ungraceful failure.

Lucas

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2015-12-11