diff options
author | Hendrik Leppkes <h.leppkes@gmail.com> | 2015-12-12 18:56:05 +0300 |
---|---|---|
committer | Hendrik Leppkes <h.leppkes@gmail.com> | 2017-08-04 20:18:33 +0300 |
commit | 1e94b5793eb45399927bac7bb60d8d6376243e51 (patch) | |
tree | 8872c315cb88c3878eb276cb858726c0ce5d6a89 | |
parent | 8c8020c2a5a58f7897adb1dc904be2d47943f2ab (diff) |
avformat/httpauth: change order of qop parameters
This fixes a bug when interacting with some (broken) HTTP servers which
expect the last entry to be a quoted string.
Also remove the quoting of the qop parameter in the process, it violates
the specification.
-rw-r--r-- | libavformat/httpauth.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/httpauth.c b/libavformat/httpauth.c index 2d42ab2190..61b48a5167 100644 --- a/libavformat/httpauth.c +++ b/libavformat/httpauth.c @@ -232,9 +232,9 @@ static char *make_digest_auth(HTTPAuthState *state, const char *username, if (digest->opaque[0]) av_strlcatf(authstr, len, ", opaque=\"%s\"", digest->opaque); if (digest->qop[0]) { - av_strlcatf(authstr, len, ", qop=\"%s\"", digest->qop); - av_strlcatf(authstr, len, ", cnonce=\"%s\"", cnonce); + av_strlcatf(authstr, len, ", qop=%s", digest->qop); av_strlcatf(authstr, len, ", nc=%s", nc); + av_strlcatf(authstr, len, ", cnonce=\"%s\"", cnonce); } av_strlcatf(authstr, len, "\r\n"); |