1
0
mirror of https://github.com/mpv-player/mpv synced 2025-03-11 08:37:59 +00:00

stream/http: support 307 (Temporary Redirect) responses

Patch by chocolateboy (chocolateboy from cpan org)

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32717 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
cboesch 2010-12-16 19:58:35 +00:00 committed by Uoti Urpala
parent da8c199505
commit f8973099ba

View File

@ -242,6 +242,7 @@ static int nop_streaming_start( stream_t *stream ) {
case 301: // Permanently
case 302: // Temporarily
case 303: // See Other
case 307: // Temporarily (since HTTP/1.1)
ret=-1;
next_url = http_get_field( http_hdr, "Location" );
@ -815,6 +816,7 @@ static int http_streaming_start(stream_t *stream, int* file_format) {
case 301: // Permanently
case 302: // Temporarily
case 303: // See Other
case 307: // Temporarily (since HTTP/1.1)
// TODO: RFC 2616, recommand to detect infinite redirection loops
next_url = http_get_field( http_hdr, "Location" );
if( next_url!=NULL ) {