From e15e51384a423be31318b3c9c7d612a1aae661fd Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 15 Jun 2020 11:28:17 +0200 Subject: 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 --- lib/curl_ntlm_wb.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/curl_ntlm_wb.c') diff --git a/lib/curl_ntlm_wb.c b/lib/curl_ntlm_wb.c index 9c800491d..17a92f8ca 100644 --- a/lib/curl_ntlm_wb.c +++ b/lib/curl_ntlm_wb.c @@ -376,8 +376,7 @@ CURLcode Curl_input_ntlm_wb(struct connectdata *conn, * This is for creating ntlm header output by delegating challenge/response * to Samba's winbind daemon helper ntlm_auth. */ -CURLcode Curl_output_ntlm_wb(struct connectdata *conn, - bool proxy) +CURLcode Curl_output_ntlm_wb(struct connectdata *conn, bool proxy) { /* point to the address of the pointer that holds the string to send to the server, which is for a plain host or for a HTTP proxy */ @@ -387,6 +386,7 @@ CURLcode Curl_output_ntlm_wb(struct connectdata *conn, struct ntlmdata *ntlm; curlntlm *state; struct auth *authp; + struct Curl_easy *data = conn->data; CURLcode res = CURLE_OK; @@ -395,7 +395,7 @@ CURLcode Curl_output_ntlm_wb(struct connectdata *conn, if(proxy) { #ifndef CURL_DISABLE_PROXY - allocuserpwd = &conn->allocptr.proxyuserpwd; + allocuserpwd = &data->state.aptr.proxyuserpwd; userp = conn->http_proxy.user; ntlm = &conn->proxyntlm; state = &conn->proxy_ntlm_state; @@ -405,7 +405,7 @@ CURLcode Curl_output_ntlm_wb(struct connectdata *conn, #endif } else { - allocuserpwd = &conn->allocptr.userpwd; + allocuserpwd = &data->state.aptr.userpwd; userp = conn->user; ntlm = &conn->ntlm; state = &conn->http_ntlm_state; -- cgit v1.2.3