# HG changeset patch # User reimar # Date 1196619841 0 # Node ID f42b8e689416264673949bdd96348121e1bcd681 # Parent 963cd0542cecaa4631850177c92cf0906012e440 Preserve unsv:// protocol specifier over http redirects. diff -r 963cd0542cec -r f42b8e689416 stream/http.c --- 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;