From 8a076d1dba48493eb009982ef68406dc5fc90ce9 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 28 Mar 2005 22:19:31 +0000 Subject: Based on Augustus Saunders' comments and findings, the HTTP output auth function was fixed to use the proper proxy authentication when multiple ones were added as accepted. test 239 and test 243 were added to repeat the problems and verify the fixes. --- lib/http.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/http.c') diff --git a/lib/http.c b/lib/http.c index 28799a6a4..d86b34fa3 100644 --- a/lib/http.c +++ b/lib/http.c @@ -407,7 +407,7 @@ Curl_http_output_auth(struct connectdata *conn, if (conn->bits.httpproxy && (conn->bits.tunnel_proxy == proxytunnel)) { #if defined(USE_SSLEAY) || defined(USE_WINDOWS_SSPI) - if(authproxy->want == CURLAUTH_NTLM) { + if(authproxy->picked == CURLAUTH_NTLM) { auth=(char *)"NTLM"; result = Curl_output_ntlm(conn, TRUE); if(result) @@ -415,7 +415,7 @@ Curl_http_output_auth(struct connectdata *conn, } else #endif - if(authproxy->want == CURLAUTH_BASIC) { + if(authproxy->picked == CURLAUTH_BASIC) { /* Basic */ if(conn->bits.proxy_user_passwd && !checkheaders(data, "Proxy-authorization:")) { @@ -429,7 +429,7 @@ Curl_http_output_auth(struct connectdata *conn, authproxy->done = TRUE; } #ifndef CURL_DISABLE_CRYPTO_AUTH - else if(authproxy->want == CURLAUTH_DIGEST) { + else if(authproxy->picked == CURLAUTH_DIGEST) { auth=(char *)"Digest"; result = Curl_output_digest(conn, TRUE, /* proxy */ @@ -463,7 +463,7 @@ Curl_http_output_auth(struct connectdata *conn, { auth = NULL; #ifdef HAVE_GSSAPI - if((authhost->want == CURLAUTH_GSSNEGOTIATE) && + if((authhost->picked == CURLAUTH_GSSNEGOTIATE) && data->state.negotiate.context && !GSS_ERROR(data->state.negotiate.status)) { auth=(char *)"GSS-Negotiate"; -- cgit v1.2.3