From ffec6111a5dba38dc418b5583b03fab0052b05f6 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 11 Feb 2021 16:30:32 +0100 Subject: urldata: don't touch data->set.httpversion at run-time 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 --- lib/transfer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/transfer.c') 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; -- cgit v1.2.1