summaryrefslogtreecommitdiffstats
path: root/stream/http.c
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2012-09-21 18:57:00 +0000
committerwm4 <wm4@nowhere>2012-10-30 19:50:20 +0100
commit82d47895e4b24e6ad096786756ad0f4923c81a4f (patch)
tree5a080eb13ab0f8a9f6263e8fba8d8a9ac0a2ca43 /stream/http.c
parent5a6dde54af8ce7208585a9e7ad0ef3ede26f24e0 (diff)
downloadmpv-82d47895e4b24e6ad096786756ad0f4923c81a4f.tar.bz2
mpv-82d47895e4b24e6ad096786756ad0f4923c81a4f.tar.xz
stream: fix redirection for proxy URLs
Fix redirection for proxy URLs. Should fix bug #2091. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35207 b3059339-0415-0410-9bf9-f77b7e298cf2 Conflicts: stream/url.c
Diffstat (limited to 'stream/http.c')
-rw-r--r--stream/http.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/stream/http.c b/stream/http.c
index 8d930c6460..3971aa9d05 100644
--- a/stream/http.c
+++ b/stream/http.c
@@ -829,18 +829,16 @@ static int http_streaming_start(stream_t *stream, int* file_format) {
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")) {
+ if (url_is_protocol(url, "mms")) {
res = STREAM_REDIRECTED;
goto err_out;
}
- if (strcasecmp(url->protocol, "http")) {
+ if (!url_is_protocol(url, "http")) {
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");
- }
+ if (is_ultravox)
+ url_set_protocol(url, "unsv");
redirect = 1;
}
break;