mirror of
https://github.com/curl/curl.git
synced 2026-07-23 18:37:17 +03:00
curl: use 2TLS by default
Make this the default for the curl tool (if built with HTTP/2 powers enabled) unless a specific HTTP version is requested on the command line. This should allow more users to get HTTP/2 powers without having to change anything.
This commit is contained in:
parent
4bcc532de5
commit
536f5f442e
11 changed files with 32 additions and 19 deletions
|
|
@ -956,9 +956,11 @@ static CURLcode operate_do(struct GlobalConfig *global,
|
|||
/* new in libcurl 7.5 */
|
||||
my_setopt(curl, CURLOPT_MAXREDIRS, config->maxredirs);
|
||||
|
||||
/* new in libcurl 7.9.1 */
|
||||
if(config->httpversion)
|
||||
my_setopt_enum(curl, CURLOPT_HTTP_VERSION, config->httpversion);
|
||||
else if(curlinfo->features & CURL_VERSION_HTTP2) {
|
||||
my_setopt_enum(curl, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_2TLS);
|
||||
}
|
||||
|
||||
/* new in libcurl 7.10.6 (default is Basic) */
|
||||
if(config->authtype)
|
||||
|
|
|
|||
|
|
@ -70,6 +70,8 @@ const NameValue setopt_nv_CURL_HTTP_VERSION[] = {
|
|||
NV(CURL_HTTP_VERSION_NONE),
|
||||
NV(CURL_HTTP_VERSION_1_0),
|
||||
NV(CURL_HTTP_VERSION_1_1),
|
||||
NV(CURL_HTTP_VERSION_2_0),
|
||||
NV(CURL_HTTP_VERSION_2TLS),
|
||||
NVEND,
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue