Commit 7e35d859 authored by Mike Edenfield's avatar Mike Edenfield Committed by Martin Storsjö

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
parent 769b74ab
...@@ -138,7 +138,8 @@ static int http_open_cnx(URLContext *h) ...@@ -138,7 +138,8 @@ static int http_open_cnx(URLContext *h)
} else } else
goto fail; 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 moved, get next */
url_close(hd); url_close(hd);
if (redirects++ >= MAX_REDIRECTS) if (redirects++ >= MAX_REDIRECTS)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment