digest: fix missing increment of 'nc' value for auth-int

- Increment nc regardless of qop type.

Prior to this change nc was only incremented for qop type auth even
though libcurl sends nc with any qop.

Closes https://github.com/curl/curl/pull/9090
This commit is contained in:
Evgeny Grin (Karlson2k) 2022-07-03 17:58:50 +03:00 committed by Jay Satiro
parent 2b2a47eb38
commit 647ed7c78b

View File

@ -850,10 +850,8 @@ static CURLcode auth_create_digest_http_message(
digest->qop, digest->qop,
request_digest); request_digest);
if(strcasecompare(digest->qop, "auth")) /* Increment nonce-count to use another nc value for the next request */
digest->nc++; /* The nc (from RFC) has to be a 8 hex digit number 0 digest->nc++;
padded which tells to the server how many times you are
using the same nonce in the qop=auth mode */
} }
else { else {
response = aprintf("username=\"%s\", " response = aprintf("username=\"%s\", "