From 5bb4c12c6bb125596ccc4b7135dd3c0f05c3b831 Mon Sep 17 00:00:00 2001 From: PixlRainbow <44422178+PixlRainbow@users.noreply.github.com> Date: Sat, 9 May 2020 20:29:08 +0800 Subject: [PATCH] Fix #465 (#467) update digest header username to use username parameter instead of "hello" test value --- httplib.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/httplib.h b/httplib.h index d82fab6..fa34904 100644 --- a/httplib.h +++ b/httplib.h @@ -2733,7 +2733,7 @@ inline std::pair 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 + "\"";