Browse Source

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
tags/n0.8
Mike Edenfield Martin Storsjö 14 years ago
parent
commit
7e35d8596b
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      libavformat/http.c

+ 2
- 1
libavformat/http.c View File

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


Loading…
Cancel
Save