mirror of
https://github.com/curl/curl.git
synced 2026-05-19 06:36:19 +03:00
Curl_pretransfer: clear out unwanted auth methods
As a handle can be re-used after having done HTTP auth in a previous request, it must make sure to clear out the HTTP types that aren't wanted in this new request.
This commit is contained in:
parent
95326a40ff
commit
13ce9031cc
1 changed files with 6 additions and 0 deletions
|
|
@ -1469,6 +1469,12 @@ CURLcode Curl_pretransfer(struct SessionHandle *data)
|
|||
|
||||
if(data->set.connecttimeout)
|
||||
Curl_expire(data, data->set.connecttimeout);
|
||||
|
||||
/* In case the handle is re-used and an authentication method was picked
|
||||
in the session we need to make sure we only use the one(s) we now
|
||||
consider to be fine */
|
||||
data->state.authhost.picked &= data->state.authhost.want;
|
||||
data->state.authproxy.picked &= data->state.authproxy.want;
|
||||
}
|
||||
|
||||
return res;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue