Explorar o código

Fix #465 (#467)

update digest header username to use username parameter instead of "hello" test value
PixlRainbow %!s(int64=5) %!d(string=hai) anos
pai
achega
5bb4c12c6b
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      httplib.h

+ 1 - 1
httplib.h

@@ -2733,7 +2733,7 @@ inline std::pair<std::string, std::string> make_digest_authentication_header(
                  ":" + qop + ":" + H(A2));
   }
 
-  auto field = "Digest username=\"hello\", realm=\"" + auth.at("realm") +
+  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 + "\"";