aboutsummaryrefslogtreecommitdiff
path: root/lib/http_ntlm.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2020-06-15 11:28:17 +0200
committerDaniel Stenberg <daniel@haxx.se>2020-06-15 22:56:25 +0200
commite15e51384a423be31318b3c9c7d612a1aae661fd (patch)
tree58d9a981811efc730b9768d87419df738cb21f10 /lib/http_ntlm.c
parent350a99b21f8c89db2d027d9a5c83ed5df72d65ea (diff)
http: move header storage to Curl_easy from connectdata
Since the connection can be used by many independent requests (using HTTP/2 or HTTP/3), things like user-agent and other transfer-specific data MUST NOT be kept connection oriented as it could lead to requests getting the wrong string for their requests. This struct data was lingering like this due to old HTTP1 legacy thinking where it didn't mattered.. Fixes #5566 Closes #5567
Diffstat (limited to 'lib/http_ntlm.c')
-rw-r--r--lib/http_ntlm.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/http_ntlm.c b/lib/http_ntlm.c
index f3b8a20ae..cab543c75 100644
--- a/lib/http_ntlm.c
+++ b/lib/http_ntlm.c
@@ -131,13 +131,15 @@ CURLcode Curl_output_ntlm(struct connectdata *conn, bool proxy)
struct ntlmdata *ntlm;
curlntlm *state;
struct auth *authp;
+ struct Curl_easy *data = conn->data;
+
DEBUGASSERT(conn);
- DEBUGASSERT(conn->data);
+ DEBUGASSERT(data);
if(proxy) {
#ifndef CURL_DISABLE_PROXY
- allocuserpwd = &conn->allocptr.proxyuserpwd;
+ allocuserpwd = &data->state.aptr.proxyuserpwd;
userp = conn->http_proxy.user;
passwdp = conn->http_proxy.passwd;
service = conn->data->set.str[STRING_PROXY_SERVICE_NAME] ?
@@ -151,7 +153,7 @@ CURLcode Curl_output_ntlm(struct connectdata *conn, bool proxy)
#endif
}
else {
- allocuserpwd = &conn->allocptr.userpwd;
+ allocuserpwd = &data->state.aptr.userpwd;
userp = conn->user;
passwdp = conn->passwd;
service = conn->data->set.str[STRING_SERVICE_NAME] ?