summaryrefslogtreecommitdiffstats
path: root/libmpdemux/http.c
diff options
context:
space:
mode:
authorrtognimp <rtognimp@b3059339-0415-0410-9bf9-f77b7e298cf2>2004-05-01 23:35:25 +0000
committerrtognimp <rtognimp@b3059339-0415-0410-9bf9-f77b7e298cf2>2004-05-01 23:35:25 +0000
commit0fec6dd1e3e71fc9ded31b3fab08ea878a490b76 (patch)
treeea51901608f6c9146f192c2b6fef1ffd62766631 /libmpdemux/http.c
parent8ef87c44bb5e502574776df142dbffb810e36a00 (diff)
downloadmpv-0fec6dd1e3e71fc9ded31b3fab08ea878a490b76.tar.bz2
mpv-0fec6dd1e3e71fc9ded31b3fab08ea878a490b76.tar.xz
Fix url escaping and avoid double escape
Patch by adland, approved by Bertrand Baudet git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@12392 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpdemux/http.c')
-rw-r--r--libmpdemux/http.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libmpdemux/http.c b/libmpdemux/http.c
index 2368592f1f..f92aecf748 100644
--- a/libmpdemux/http.c
+++ b/libmpdemux/http.c
@@ -175,12 +175,12 @@ http_build_request( HTTP_header_t *http_hdr ) {
if( http_hdr->method==NULL ) http_set_method( http_hdr, "GET");
if( http_hdr->uri==NULL ) http_set_uri( http_hdr, "/");
else {
- uri = (char*)malloc((strlen(http_hdr->uri)*3) + 1);
+ uri = (char*)malloc(strlen(http_hdr->uri) + 1);
if( uri==NULL ) {
mp_msg(MSGT_NETWORK,MSGL_ERR,"Memory allocation failed\n");
return NULL;
}
- url_escape_string( uri, http_hdr->uri );
+ strcpy(uri,http_hdr->uri);
}
//**** Compute the request length