diff options
author | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2010-11-12 07:16:32 +0000 |
---|---|---|
committer | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2010-11-14 12:35:56 +0200 |
commit | c96f83c23576ec04e8ff88fa08f1c16eba68a019 (patch) | |
tree | f89dec2e29ee9ced70d04c47858aca883d674ae9 | |
parent | 111757c3f424963a5ceaafbb358183de0ea7f6e3 (diff) | |
download | mpv-c96f83c23576ec04e8ff88fa08f1c16eba68a019.tar.bz2 mpv-c96f83c23576ec04e8ff88fa08f1c16eba68a019.tar.xz |
stream/url.c: Unescape username/password when parsing URLs
This makes MPlayer handle it the same way as curl, and it also is the
only method that works with http_proxy://...http://user:password@...
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32621 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r-- | stream/url.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/stream/url.c b/stream/url.c index 3a2d9b96e9..0d64382e2f 100644 --- a/stream/url.c +++ b/stream/url.c @@ -152,7 +152,9 @@ url_new(const char* url) { } strncpy( Curl->password, ptr3+1, len2); Curl->password[len2]='\0'; + url_unescape_string(Curl->password, Curl->password); } + url_unescape_string(Curl->username, Curl->username); ptr1 = ptr2+1; pos1 = ptr1-escfilename; } @@ -251,7 +253,8 @@ url_free(URL_t* url) { /* Replace escape sequences in an URL (or a part of an URL) */ -/* works like strcpy(), but without return argument */ +/* works like strcpy(), but without return argument, + except that outbuf == inbuf is allowed */ void url_unescape_string(char *outbuf, const char *inbuf) { |