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>
This commit is contained in:
Martin Storsjö 2012-03-12 14:03:46 +02:00
parent e75bbcf493
commit 499ad54d98

View File

@ -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;