diff options
author | Daniel Stenberg <daniel@haxx.se> | 2004-05-04 07:52:53 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2004-05-04 07:52:53 +0000 |
commit | fc6eff13b5414caf6edf22d73a3239e074a04216 (patch) | |
tree | eada47ce6b65dee31800734c70220bf22c8deec3 /lib/http_ntlm.c | |
parent | e7ee1ccf4596a37a2278e523d0da7652ab43a42c (diff) | |
download | curl-fc6eff13b5414caf6edf22d73a3239e074a04216.tar.gz |
General HTTP authentication cleanup and fixes
Diffstat (limited to 'lib/http_ntlm.c')
-rw-r--r-- | lib/http_ntlm.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/lib/http_ntlm.c b/lib/http_ntlm.c index d1f4e306c..9629b34d1 100644 --- a/lib/http_ntlm.c +++ b/lib/http_ntlm.c @@ -46,7 +46,6 @@ #include "base64.h" #include "http_ntlm.h" #include "url.h" -#include "http.h" /* for Curl_http_auth_stage() */ #define _MPRINTF_REPLACE /* use our functions only */ #include <curl/mprintf.h> @@ -298,23 +297,26 @@ CURLcode Curl_output_ntlm(struct connectdata *conn, char *passwdp; /* point to the correct struct with this */ struct ntlmdata *ntlm; + struct auth *authp; curlassert(conn); curlassert(conn->data); - conn->data->state.authdone = FALSE; if(proxy) { allocuserpwd = &conn->allocptr.proxyuserpwd; userp = conn->proxyuser; passwdp = conn->proxypasswd; ntlm = &conn->proxyntlm; + authp = &conn->data->state.authproxy; } else { allocuserpwd = &conn->allocptr.userpwd; userp = conn->user; passwdp = conn->passwd; ntlm = &conn->ntlm; + authp = &conn->data->state.authhost; } + authp->done = FALSE; /* not set means empty */ if(!userp) @@ -563,11 +565,7 @@ CURLcode Curl_output_ntlm(struct connectdata *conn, return CURLE_OUT_OF_MEMORY; /* FIX TODO */ ntlm->state = NTLMSTATE_TYPE3; /* we sent a type-3 */ - conn->data->state.authdone = TRUE; - - /* Switch to web authentication after proxy authentication is done */ - if (proxy) - Curl_http_auth_stage(conn->data, 401); + authp->done = TRUE; } break; @@ -578,7 +576,7 @@ CURLcode Curl_output_ntlm(struct connectdata *conn, free(*allocuserpwd); *allocuserpwd=NULL; } - conn->data->state.authdone = TRUE; + authp->done = TRUE; break; } |