diff options
Diffstat (limited to 'lib/transfer.c')
-rw-r--r-- | lib/transfer.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/transfer.c b/lib/transfer.c index 2eda08889..7d060c689 100644 --- a/lib/transfer.c +++ b/lib/transfer.c @@ -96,6 +96,7 @@ #include "getinfo.h" #include "ssluse.h" #include "http_digest.h" +#include "http_ntlm.h" #ifdef GSSAPI #include "http_negotiate.h" #endif @@ -736,6 +737,17 @@ CURLcode Curl_readwrite(struct connectdata *conn, conn->newurl = strdup(data->change.url); } #endif + else if(Curl_compareheader(k->p, + "WWW-Authenticate:", "NTLM") && + (401 == k->httpcode) && + data->set.httpntlm /* NTLM authentication is + activated */) { + CURLntlm ntlm; + ntlm = Curl_input_ntlm(conn, + k->p+strlen("WWW-Authenticate:")); + + conn->newurl = strdup(data->change.url); /* clone string */ + } else if(checkprefix("WWW-Authenticate:", k->p) && (401 == k->httpcode) && data->set.httpdigest /* Digest authentication is |