aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2012-11-05 23:31:24 +0100
committerDaniel Stenberg <daniel@haxx.se>2012-11-06 22:23:56 +0100
commit13ce9031cc3af2accc1be9e93cfc462efe513343 (patch)
tree10e7d6af584ed755c364ff76a6ea10ba4fe2fd6e
parent95326a40ffe567b3f37706e078a5914244a45ee5 (diff)
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.
-rw-r--r--lib/transfer.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/transfer.c b/lib/transfer.c
index a00469ee6..3492efd25 100644
--- a/lib/transfer.c
+++ b/lib/transfer.c
@@ -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;