From 15cddcd5112b977e3316baa30fcb6dec25f78105 Mon Sep 17 00:00:00 2001 From: reimar Date: Sun, 2 Dec 2007 18:24:01 +0000 Subject: Preserve unsv:// protocol specifier over http redirects. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25266 b3059339-0415-0410-9bf9-f77b7e298cf2 --- stream/http.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'stream') diff --git a/stream/http.c b/stream/http.c index abf92e7227..1eb65d8bb3 100644 --- a/stream/http.c +++ b/stream/http.c @@ -836,6 +836,7 @@ static int http_streaming_start(stream_t *stream, int* file_format) { // TODO: RFC 2616, recommand to detect infinite redirection loops next_url = http_get_field( http_hdr, "Location" ); if( next_url!=NULL ) { + int is_ultravox = strcasecmp(stream->streaming_ctrl->url->protocol, "unsv") == 0; stream->streaming_ctrl->url = url_redirect( &url, next_url ); if (!strcasecmp(url->protocol, "mms")) { res = STREAM_REDIRECTED; @@ -845,6 +846,10 @@ static int http_streaming_start(stream_t *stream, int* file_format) { mp_msg(MSGT_NETWORK,MSGL_ERR,"Unsupported http %d redirect to %s protocol\n", http_hdr->status_code, url->protocol); goto err_out; } + if (is_ultravox) { + free(url->protocol); + url->protocol = strdup("unsv"); + } redirect = 1; } break; -- cgit v1.2.3