summaryrefslogtreecommitdiff
path: root/lib/transfer.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/transfer.c
parent1560cd1f9f5a2ecfe91d138a3189160c212855a4 (diff)
downloadcurl-bagder/http-state-version.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/transfer.c')
-rw-r--r--lib/transfer.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/transfer.c b/lib/transfer.c
index c3b2d11a2..0b27b3455 100644
--- a/lib/transfer.c
+++ b/lib/transfer.c
@@ -1431,8 +1431,8 @@ CURLcode Curl_pretransfer(struct Curl_easy *data)
data->state.followlocation = 0; /* reset the location-follow counter */
data->state.this_is_a_follow = FALSE; /* reset this */
data->state.errorbuf = FALSE; /* no error has occurred */
- data->state.httpversion = 0; /* don't assume any particular server version */
-
+ data->state.httpwant = data->set.httpwant;
+ data->state.httpversion = 0;
data->state.authproblem = FALSE;
data->state.authhost.want = data->set.httpauth;
data->state.authproxy.want = data->set.proxyauth;