mirror of
https://github.com/yhirose/cpp-httplib.git
synced 2026-11-29 21:18:29 +00:00
The Digest client compared the algorithm and qop values of a challenge case-sensitively, so algorithm=sha-256 was answered with an MD5 hash and qop="AUTH" without qop. A challenge whose algorithm it doesn't implement (SHA-512-256, the -sess variants, or a value that isn't a token) was answered with an MD5 hash under the server's algorithm name, and only the first Digest challenge was ever looked at. - Match algorithm and qop options case-insensitively. qop is split into tokens instead of searched as a substring, and sent as auth/auth-int. - Collect params per Digest challenge and use the first one the client can answer (RFC 7616 Sections 3.3 and 3.7): realm and nonce present and an algorithm it implements. If there is none, the 401 is returned without a retry. - digest_hash() is the single list of supported algorithms, used by both parse_www_authenticate() and make_digest_authentication_header(). The algorithm is sent back as the server wrote it (RFC 7616 Section 3.4). parse_www_authenticate() moves into the SSL block, next to the hash functions and its callers.