[MPlayer-cvslog] r32621 - trunk/stream/url.c
reimar
subversion at mplayerhq.hu
Fri Nov 12 08:16:32 CET 2010
Author: reimar
Date: Fri Nov 12 08:16:32 2010
New Revision: 32621
Log:
Unescape username/password when URL-parsing.
This makes MPlayer handle it teh same way as curl,
and it also is the only method that works with
http_proxy://...http://user:password@...
Modified:
trunk/stream/url.c
Modified: trunk/stream/url.c
==============================================================================
--- trunk/stream/url.c Wed Nov 10 23:48:41 2010 (r32620)
+++ trunk/stream/url.c Fri Nov 12 08:16:32 2010 (r32621)
@@ -153,7 +153,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;
}
@@ -252,7 +254,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)
{
More information about the MPlayer-cvslog
mailing list