On Thu, Dec 10, 2015 at 11:47:34PM +0100, Daniel Stenberg wrote: > Hey > > With this new argument to the CURLOPT_HTTP_VERSION option, libcurl is told > to ask for HTTP/2 only when using TLS and not over clear-text. There should > be very little risk or over-head from just asking over TLS so it can easily > be made the default for the curl tool when it uses a libcurl with HTTP/2 > support. Eventually we can probably make libcurl use this default too, when > we've test-run this for a good while with the curl tool. > > 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). > > This mimics more or less what modern browsers do. > > I'll land this really soon unless there are questions, doubts or objections?
Great. I will add that not all HTTP/1.1 servers handle the upgrade request gracefully. 'http://*.phobos.apple.com' servers running (ApacheTrafficServer/5.3.2) fail with: < HTTP/1.1 400 Invalid Upgrade Request So, performance is not the only consideration here. > > -- > > / daniel.haxx.se > ------------------------------------------------------------------- > List admin: http://cool.haxx.se/list/listinfo/curl-library > Etiquette: http://curl.haxx.se/mail/etiquette.html ------------------------------------------------------------------- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette: http://curl.haxx.se/mail/etiquette.html
