summaryrefslogtreecommitdiffstats
path: root/lib/http_ntlm.c
diff options
context:
space:
mode:
authorCurl Upstream <curl-library@lists.haxx.se>2022-01-04 23:35:58 (GMT)
committerBrad King <brad.king@kitware.com>2022-01-07 16:41:33 (GMT)
commita1f6ec647cfab8d613897562f8ee5f81a8f6b68d (patch)
tree23868e745531ca352f4ae8df37dc242b8ed6f80e /lib/http_ntlm.c
parenta4ad12d8435cdd4ab7301d21215c40348c04c8ed (diff)
downloadCMake-a1f6ec647cfab8d613897562f8ee5f81a8f6b68d.zip
CMake-a1f6ec647cfab8d613897562f8ee5f81a8f6b68d.tar.gz
CMake-a1f6ec647cfab8d613897562f8ee5f81a8f6b68d.tar.bz2
curl 2022-01-05 (801bd513)
Code extracted from: https://github.com/curl/curl.git at commit 801bd5138ce31aa0d906fa4e2eabfc599d74e793 (curl-7_81_0).
Diffstat (limited to 'lib/http_ntlm.c')
-rw-r--r--lib/http_ntlm.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/http_ntlm.c b/lib/http_ntlm.c
index 627a11c..a6526db 100644
--- a/lib/http_ntlm.c
+++ b/lib/http_ntlm.c
@@ -198,6 +198,12 @@ CURLcode Curl_output_ntlm(struct Curl_easy *data, bool proxy)
#endif
Curl_bufref_init(&ntlmmsg);
+
+ /* connection is already authenticated, don't send a header in future
+ * requests so go directly to NTLMSTATE_LAST */
+ if(*state == NTLMSTATE_TYPE3)
+ *state = NTLMSTATE_LAST;
+
switch(*state) {
case NTLMSTATE_TYPE1:
default: /* for the weird cases we (re)start here */
@@ -246,11 +252,6 @@ CURLcode Curl_output_ntlm(struct Curl_easy *data, bool proxy)
}
break;
- case NTLMSTATE_TYPE3:
- /* connection is already authenticated,
- * don't send a header in future requests */
- *state = NTLMSTATE_LAST;
- /* FALLTHROUGH */
case NTLMSTATE_LAST:
Curl_safefree(*allocuserpwd);
authp->done = TRUE;