changeset 32534:899d7464d246

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@...
author reimar
date Fri, 12 Nov 2010 07:16:32 +0000
parents c41773445d3b
children 6320065226a6
files stream/url.c
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/stream/url.c	Wed Nov 10 22:48:41 2010 +0000
+++ b/stream/url.c	Fri Nov 12 07:16:32 2010 +0000
@@ -153,7 +153,9 @@
 			}
 			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 @@
 
 
 /* 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)
 {