mirror of
https://github.com/yhirose/cpp-httplib
synced 2024-11-21 14:29:10 -07:00
Fix #1054
This commit is contained in:
parent
e1afe74fe2
commit
4e05368086
1 changed files with 8 additions and 5 deletions
13
httplib.h
13
httplib.h
|
@ -4074,11 +4074,14 @@ inline std::pair<std::string, std::string> make_digest_authentication_header(
|
|||
}
|
||||
}
|
||||
|
||||
auto field = "Digest username=\"" + username + "\", realm=\"" +
|
||||
auth.at("realm") + "\", nonce=\"" + auth.at("nonce") +
|
||||
"\", uri=\"" + req.path + "\", algorithm=" + algo +
|
||||
", qop=" + qop + ", nc=\"" + nc + "\", cnonce=\"" + cnonce +
|
||||
"\", response=\"" + response + "\"";
|
||||
auto field =
|
||||
"Digest username=\"" + username + "\", realm=\"" + auth.at("realm") +
|
||||
"\", nonce=\"" + auth.at("nonce") + "\", uri=\"" + req.path +
|
||||
"\", algorithm=" + algo +
|
||||
(qop.empty() ? ", response=\""
|
||||
: ", qop=" + qop + ", nc=\"" + nc + "\", cnonce=\"" +
|
||||
cnonce + "\", response=\"") +
|
||||
response + "\"";
|
||||
|
||||
auto key = is_proxy ? "Proxy-Authorization" : "Authorization";
|
||||
return std::make_pair(key, field);
|
||||
|
|
Loading…
Reference in a new issue