summaryrefslogtreecommitdiff
path: root/libavformat/http.c
diff options
context:
space:
mode:
authorMike Edenfield <kutulu@kutulu.org>2010-11-02 20:37:01 +0000
committerMartin Storsjö <martin@martin.st>2010-11-02 20:37:01 +0000
commit7e35d8596b4abdf2331c7fb2bf1a73e8be08c4a8 (patch)
treea3e0eeae6ba7d9513182f4353097f34d54afca61 /libavformat/http.c
parent769b74ab85f3a0b049325e3e5428e5287ecbcdeb (diff)
http: Handle 301/307 redirect requests, too
Patch by Mike Edenfield, kutulu at kutulu dot org Originally committed as revision 25651 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/http.c')
-rw-r--r--libavformat/http.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/http.c b/libavformat/http.c
index f58c78a49b..e9fab3b616 100644
--- a/libavformat/http.c
+++ b/libavformat/http.c
@@ -138,7 +138,8 @@ static int http_open_cnx(URLContext *h)
} else
goto fail;
}
- if ((s->http_code == 302 || s->http_code == 303) && location_changed == 1) {
+ if ((s->http_code == 301 || s->http_code == 302 || s->http_code == 303 || s->http_code == 307)
+ && location_changed == 1) {
/* url moved, get next */
url_close(hd);
if (redirects++ >= MAX_REDIRECTS)