aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2020-01-05 17:12:03 +0100
committerDaniel Stenberg <daniel@haxx.se>2020-01-05 21:24:17 +0100
commit459d0db45b263ab74940f526aec3799329940e52 (patch)
tree0b3862abbf66c5b9d3b82df6a35bed9583a0052e /src
parent2150c4b5d3597d9e03b036279f9eb70eae9d0229 (diff)
curl:getparameter return error for --http3 if libcurl doesn't support
Closes #4785
Diffstat (limited to 'src')
-rw-r--r--src/tool_getparam.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/tool_getparam.c b/src/tool_getparam.c
index ced453192..8df6e5e24 100644
--- a/src/tool_getparam.c
+++ b/src/tool_getparam.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -1209,7 +1209,10 @@ ParameterError getparameter(const char *flag, /* f or -long-flag */
break;
case '4': /* --http3 */
/* HTTP version 3 go over QUIC - at once */
- config->httpversion = CURL_HTTP_VERSION_3;
+ if(curlinfo->features & CURL_VERSION_HTTP3)
+ config->httpversion = CURL_HTTP_VERSION_3;
+ else
+ return PARAM_LIBCURL_DOESNT_SUPPORT;
break;
case '9':
/* Allow HTTP/0.9 responses! */