1
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 4e417b7c92
commit fbb584b27c
Signed by: hendrik
GPG Key ID: 846079A4B0A7C1B5

View File

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