diff options
author | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2007-12-02 18:24:01 +0000 |
---|---|---|
committer | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2007-12-02 18:24:01 +0000 |
commit | 15cddcd5112b977e3316baa30fcb6dec25f78105 (patch) | |
tree | 8e71486f195e71325126e91d999536b7d820eeaa /stream | |
parent | 8d5573a14e1e52ad590755ac25ea82ee3d911aa1 (diff) | |
download | mpv-15cddcd5112b977e3316baa30fcb6dec25f78105.tar.bz2 mpv-15cddcd5112b977e3316baa30fcb6dec25f78105.tar.xz |
Preserve unsv:// protocol specifier over http redirects.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25266 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'stream')
-rw-r--r-- | stream/http.c | 5 |
1 files changed, 5 insertions, 0 deletions
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; |