From: Ronald S. Bultje Date: Sun, 4 Mar 2007 11:52:46 +0000 (+0000) Subject: make HTTP MOVED messages also work in ffmpeg (302 is essentially the same as 303). X-Git-Tag: v0.5~9829 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a3fd2bd87d1060d9f391969950c58cd56aad7847;p=platform%2Fupstream%2Flibav.git make HTTP MOVED messages also work in ffmpeg (302 is essentially the same as 303). patch by "Ronald S. Bultje" % rbultje A ronald P bitfreak P net% original thread: Date: Mar 4, 2007 1:21 AM Subject: [Ffmpeg-devel] http move Originally committed as revision 8219 to svn://svn.ffmpeg.org/ffmpeg/trunk --- diff --git a/libavformat/http.c b/libavformat/http.c index 1284c31..c1423cb 100644 --- a/libavformat/http.c +++ b/libavformat/http.c @@ -96,7 +96,7 @@ static int http_open_cnx(URLContext *h) s->hd = hd; if (http_connect(h, path, hoststr, auth, &location_changed) < 0) goto fail; - if (s->http_code == 303 && location_changed == 1) { + if ((s->http_code == 302 || s->http_code == 303) && location_changed == 1) { /* url moved, get next */ url_close(hd); if (redirects++ >= MAX_REDIRECTS)