From: Carl Eugen Hoyos <[email protected]>
Some overly strict implementations require this, even though it
technically is incorrect according to the spec.
In practice many other implementations seem to be using quotes here,
including cURL.
---
libavformat/httpauth.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/libavformat/httpauth.c b/libavformat/httpauth.c
index b96da3e..403b166 100644
--- a/libavformat/httpauth.c
+++ b/libavformat/httpauth.c
@@ -224,8 +224,11 @@ static char *make_digest_auth(HTTPAuthState *state, const
char *username,
av_strlcatf(authstr, len, ",nonce=\"%s\"", digest->nonce);
av_strlcatf(authstr, len, ",uri=\"%s\"", uri);
av_strlcatf(authstr, len, ",response=\"%s\"", response);
+
+ // we are violating the RFC and use "" because all others seem to do that
too.
if (digest->algorithm[0])
- av_strlcatf(authstr, len, ",algorithm=%s", digest->algorithm);
+ av_strlcatf(authstr, len, ",algorithm=\"%s\"", digest->algorithm);
+
if (digest->opaque[0])
av_strlcatf(authstr, len, ",opaque=\"%s\"", digest->opaque);
if (digest->qop[0]) {
--
2.3.8 (Apple Git-58)
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel