summaryrefslogtreecommitdiff
path: root/lib/url.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2021-02-11 16:30:32 +0100
committerDaniel Stenberg <daniel@haxx.se>2021-02-11 16:30:32 +0100
commitffec6111a5dba38dc418b5583b03fab0052b05f6 (patch)
tree23f6ec48ae762dde34fc4c656a6072ab820e931f /lib/url.c
parent1560cd1f9f5a2ecfe91d138a3189160c212855a4 (diff)
downloadcurl-ffec6111a5dba38dc418b5583b03fab0052b05f6.tar.gz
urldata: don't touch data->set.httpversion at run-timebagder/http-state-version
Rename it to 'httpwant' and make a cloned field in the state struct as well for run-time updates. Also: refuse non-supported HTTP versions. Verified with test 129. Closes #6585
Diffstat (limited to 'lib/url.c')
-rw-r--r--lib/url.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/url.c b/lib/url.c
index f160b1596..d21e4ad4f 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -609,7 +609,7 @@ CURLcode Curl_init_userdefined(struct Curl_easy *data)
set->maxconnects = DEFAULT_CONNCACHE_SIZE; /* for easy handles */
set->maxage_conn = 118;
set->http09_allowed = FALSE;
- set->httpversion =
+ set->httpwant =
#ifdef USE_NGHTTP2
CURL_HTTP_VERSION_2TLS
#else
@@ -887,7 +887,7 @@ static int IsMultiplexingPossible(const struct Curl_easy *handle,
(!conn->bits.protoconnstart || !conn->bits.close)) {
if(Curl_multiplex_wanted(handle->multi) &&
- (handle->set.httpversion >= CURL_HTTP_VERSION_2))
+ (handle->state.httpwant >= CURL_HTTP_VERSION_2))
/* allows HTTP/2 */
avail |= CURLPIPE_MULTIPLEX;
}