1
0
Fork 0

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.
This commit is contained in:
Hendrik Leppkes 2015-12-12 16:56:05 +01:00
parent 4a45fdf12b
commit 396a14fcef
Signed by: hendrik
GPG Key ID: 846079A4B0A7C1B5
1 changed files with 2 additions and 2 deletions

View File

@ -226,9 +226,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");