summaryrefslogtreecommitdiff
path: root/libavformat/http.c
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2012-03-12 14:03:46 +0200
committerMartin Storsjö <martin@martin.st>2012-03-13 11:19:29 +0200
commit499ad54d982307a31ef70f6256a9ffccff0057e5 (patch)
treeaf90cfa03dcb1d1d78f0f712109053a75d7f1d76 /libavformat/http.c
parente75bbcf493aeb549d04c56f49406aeee3950d93b (diff)
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>
Diffstat (limited to 'libavformat/http.c')
-rw-r--r--libavformat/http.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavformat/http.c b/libavformat/http.c
index a768b19fd9..c69e3f5055 100644
--- a/libavformat/http.c
+++ b/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;