Mercurial > mplayer.hg
changeset 25238:f42b8e689416
Preserve unsv:// protocol specifier over http redirects.
author | reimar |
---|---|
date | Sun, 02 Dec 2007 18:24:01 +0000 |
parents | 963cd0542cec |
children | c1b3a06a3c6e |
files | stream/http.c |
diffstat | 1 files changed, 5 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/stream/http.c Sun Dec 02 18:04:14 2007 +0000 +++ b/stream/http.c Sun Dec 02 18:24:01 2007 +0000 @@ -836,6 +836,7 @@ // 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 @@ 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;