curl / Mailing Lists / curl-library / Single Mail


Enable HTTP/2 when using HTTPS, by default

From: Daniel Stenberg <>
Date: Thu, 5 Jul 2018 14:35:23 +0200 (CEST)


I'd like to switch libcurl's default HTTP version in 7.62.0 to opt in to
HTTP/2 when using HTTPS scheme URLs (if built with support for HTTP/2). It is
called CURL_HTTP_VERSION_2TLS when set with the API.

This is required to make the most of the suggested change of the multiplex
default, so that applications that are using the multi interface will start to
both use HTTP/2 and allow its multiplexing features - without having to change

Applications that set a desired HTTP version explicitly will of course not be
affected by this change.

The curl command line tool has used CURL_HTTP_VERSION_2TLS by default since
commit 536f5f442e, December 2015. Shipped since 7.47.0. We've seen little if
any problems with this. I think its time to do more HTTP/2 with libcurl.

I've pushed this suggested change in the same branch that enables multiplexing
by default. See

Received on 2018-07-05