aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/tool_operate.c4
-rw-r--r--src/tool_setopt.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/src/tool_operate.c b/src/tool_operate.c
index d5177d92b..e5506c6fa 100644
--- a/src/tool_operate.c
+++ b/src/tool_operate.c
@@ -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)
diff --git a/src/tool_setopt.c b/src/tool_setopt.c
index e11f527ac..ff8d40719 100644
--- a/src/tool_setopt.c
+++ b/src/tool_setopt.c
@@ -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,
};