Fix http authentication.

Add parenthesis around "MD5" in the request string as required by
RFC 2069.

Fixes ticket #3417.

Reported and tested by Haarman
Analyzed-by: Eugen-Andrei Gavriloaie
pull/60/head
Carl Eugen Hoyos 11 years ago
parent 4f4cc43fd8
commit 3ba056017f
  1. 2
      libavformat/httpauth.c

@ -225,7 +225,7 @@ static char *make_digest_auth(HTTPAuthState *state, const char *username,
av_strlcatf(authstr, len, ",uri=\"%s\"", uri); av_strlcatf(authstr, len, ",uri=\"%s\"", uri);
av_strlcatf(authstr, len, ",response=\"%s\"", response); av_strlcatf(authstr, len, ",response=\"%s\"", response);
if (digest->algorithm[0]) if (digest->algorithm[0])
av_strlcatf(authstr, len, ",algorithm=%s", digest->algorithm); av_strlcatf(authstr, len, ",algorithm=\"%s\"", digest->algorithm);
if (digest->opaque[0]) if (digest->opaque[0])
av_strlcatf(authstr, len, ",opaque=\"%s\"", digest->opaque); av_strlcatf(authstr, len, ",opaque=\"%s\"", digest->opaque);
if (digest->qop[0]) { if (digest->qop[0]) {

Loading…
Cancel
Save