digest: Do not quote algorithm in HTTP authorisation

RFC 7616 section 3.4 (The Authorization Header Field) states that "For
historical reasons, a sender MUST NOT generate the quoted string syntax
for the following parameters: algorithm, qop, and nc". This removes the
quoting for the algorithm parameter.

Reviewed-by: Steve Holme
Closes #4890
This commit is contained in:
Pierre-Yves Bigourdan 2020-02-06 15:43:06 +00:00 committed by Daniel Stenberg
parent 5ce7102cea
commit feba3f0549
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
15 changed files with 16 additions and 16 deletions

View file

@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
* Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
* Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@ -899,7 +899,7 @@ static CURLcode _Curl_auth_create_digest_http_message(
if(digest->algorithm) {
/* Append the algorithm */
tmp = aprintf("%s, algorithm=\"%s\"", response, digest->algorithm);
tmp = aprintf("%s, algorithm=%s", response, digest->algorithm);
free(response);
if(!tmp)
return CURLE_OUT_OF_MEMORY;