Skip to content
Snippets Groups Projects
Commit a3fd2bd8 authored by Ronald S. Bultje's avatar Ronald S. Bultje Committed by Guillaume Poirier
Browse files

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
parent 92d6b7fd
No related branches found
No related tags found
No related merge requests found
...@@ -96,7 +96,7 @@ static int http_open_cnx(URLContext *h) ...@@ -96,7 +96,7 @@ static int http_open_cnx(URLContext *h)
s->hd = hd; s->hd = hd;
if (http_connect(h, path, hoststr, auth, &location_changed) < 0) if (http_connect(h, path, hoststr, auth, &location_changed) < 0)
goto fail; 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 moved, get next */
url_close(hd); url_close(hd);
if (redirects++ >= MAX_REDIRECTS) if (redirects++ >= MAX_REDIRECTS)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment