1
mirror of https://git.videolan.org/git/ffmpeg.git synced 2024-08-08 18:35:45 +02:00

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
This commit is contained in:
Ronald S. Bultje 2007-03-04 11:52:46 +00:00 committed by Guillaume Poirier
parent 92d6b7fda2
commit a3fd2bd87d

View File

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