diff options
author | Daniel Stenberg <daniel@haxx.se> | 2021-02-11 16:30:32 +0100 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2021-02-11 16:30:32 +0100 |
commit | ffec6111a5dba38dc418b5583b03fab0052b05f6 (patch) | |
tree | 23f6ec48ae762dde34fc4c656a6072ab820e931f /lib/url.c | |
parent | 1560cd1f9f5a2ecfe91d138a3189160c212855a4 (diff) | |
download | curl-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.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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; } |