http: Clear the auth state on redirects

Currently we only try continuing with the same auth mechanism
as the initial request.

Signed-off-by: Martin Storsjö <martin@martin.st>
pull/3/merge
Martin Storsjö 13 years ago
parent e75bbcf493
commit 499ad54d98
  1. 3
      libavformat/http.c

@ -168,6 +168,9 @@ static int http_open_cnx(URLContext *h)
ffurl_close(hd);
if (redirects++ >= MAX_REDIRECTS)
return AVERROR(EIO);
/* Restart the authentication process with the new target, which
* might use a different auth mechanism. */
memset(&s->auth_state, 0, sizeof(s->auth_state));
attempts = 0;
location_changed = 0;
goto redo;

Loading…
Cancel
Save