This commit is contained in:
yhirose 2021-09-11 14:13:49 -04:00
parent e1afe74fe2
commit 4e05368086

View File

@ -4074,11 +4074,14 @@ inline std::pair<std::string, std::string> make_digest_authentication_header(
} }
} }
auto field = "Digest username=\"" + username + "\", realm=\"" + auto field =
auth.at("realm") + "\", nonce=\"" + auth.at("nonce") + "Digest username=\"" + username + "\", realm=\"" + auth.at("realm") +
"\", uri=\"" + req.path + "\", algorithm=" + algo + "\", nonce=\"" + auth.at("nonce") + "\", uri=\"" + req.path +
", qop=" + qop + ", nc=\"" + nc + "\", cnonce=\"" + cnonce + "\", algorithm=" + algo +
"\", response=\"" + response + "\""; (qop.empty() ? ", response=\""
: ", qop=" + qop + ", nc=\"" + nc + "\", cnonce=\"" +
cnonce + "\", response=\"") +
response + "\"";
auto key = is_proxy ? "Proxy-Authorization" : "Authorization"; auto key = is_proxy ? "Proxy-Authorization" : "Authorization";
return std::make_pair(key, field); return std::make_pair(key, field);