[FFmpeg-cvslog] r25651 - trunk/libavformat/http.c

mstorsjo subversion
Tue Nov 2 21:37:01 CET 2010


Author: mstorsjo
Date: Tue Nov  2 21:37:01 2010
New Revision: 25651

Log:
http: Handle 301/307 redirect requests, too

Patch by Mike Edenfield, kutulu at kutulu dot org

Modified:
   trunk/libavformat/http.c

Modified: trunk/libavformat/http.c
==============================================================================
--- trunk/libavformat/http.c	Tue Nov  2 21:29:20 2010	(r25650)
+++ trunk/libavformat/http.c	Tue Nov  2 21:37:01 2010	(r25651)
@@ -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)



More information about the ffmpeg-cvslog mailing list