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.
This commit is contained in:
Daniel Stenberg
2005-03-28 22:19:31 +00:00
parent 970722483c
commit 8a076d1dba
4 changed files with 194 additions and 5 deletions

View File

@@ -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";