summaryrefslogtreecommitdiffstats
path: root/lib/http_digest.c
diff options
context:
space:
mode:
authorCurl Upstream <curl-library@cool.haxx.se>2021-05-26 06:18:11 (GMT)
committerBrad King <brad.king@kitware.com>2021-05-27 19:11:35 (GMT)
commit18b2a8d7604f3aced9c93220806851f96e231f36 (patch)
tree5a79eb90691de68ebfb91ac85d7e8faea3190a4d /lib/http_digest.c
parent076b3219f58ca16afa52fe095019a05537ade0f3 (diff)
downloadCMake-18b2a8d7604f3aced9c93220806851f96e231f36.zip
CMake-18b2a8d7604f3aced9c93220806851f96e231f36.tar.gz
CMake-18b2a8d7604f3aced9c93220806851f96e231f36.tar.bz2
curl 2021-05-26 (6b951a69)
Code extracted from: https://github.com/curl/curl.git at commit 6b951a6928811507d493303b2878e848c077b471 (curl-7_77_0).
Diffstat (limited to 'lib/http_digest.c')
-rw-r--r--lib/http_digest.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/http_digest.c b/lib/http_digest.c
index 596b215..049b232 100644
--- a/lib/http_digest.c
+++ b/lib/http_digest.c
@@ -56,7 +56,7 @@ CURLcode Curl_input_digest(struct Curl_easy *data,
digest = &data->state.digest;
}
- if(!checkprefix("Digest", header))
+ if(!checkprefix("Digest", header) || !ISSPACE(header[6]))
return CURLE_BAD_CONTENT_ENCODING;
header += strlen("Digest");
@@ -67,7 +67,6 @@ CURLcode Curl_input_digest(struct Curl_easy *data,
}
CURLcode Curl_output_digest(struct Curl_easy *data,
- struct connectdata *conn,
bool proxy,
const unsigned char *request,
const unsigned char *uripath)
@@ -97,16 +96,16 @@ CURLcode Curl_output_digest(struct Curl_easy *data,
#else
digest = &data->state.proxydigest;
allocuserpwd = &data->state.aptr.proxyuserpwd;
- userp = conn->http_proxy.user;
- passwdp = conn->http_proxy.passwd;
+ userp = data->state.aptr.proxyuser;
+ passwdp = data->state.aptr.proxypasswd;
authp = &data->state.authproxy;
#endif
}
else {
digest = &data->state.digest;
allocuserpwd = &data->state.aptr.userpwd;
- userp = conn->user;
- passwdp = conn->passwd;
+ userp = data->state.aptr.user;
+ passwdp = data->state.aptr.passwd;
authp = &data->state.authhost;
}