[vlc-commits] http: do not replace spaces with plusses in the URL
Rémi Denis-Courmont
git at videolan.org
Wed Sep 2 21:54:14 CEST 2015
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed Sep 2 22:09:37 2015 +0300| [7c836144132cbc17b801b7feaa1b487ed5d4371b] | committer: Rémi Denis-Courmont
http: do not replace spaces with plusses in the URL
This does not make any sense. Spaces are normally encoded as %20 (+ is for
query parameters values only).
Also fix variable shadowing.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=7c836144132cbc17b801b7feaa1b487ed5d4371b
---
modules/access/http.c | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/modules/access/http.c b/modules/access/http.c
index cb01321..99dd71d 100644
--- a/modules/access/http.c
+++ b/modules/access/http.c
@@ -232,7 +232,7 @@ static int OpenRedirected( vlc_object_t *p_this, const char *psz_access,
{
access_t *p_access = (access_t*)p_this;
access_sys_t *p_sys;
- char *psz, *p;
+ char *psz;
/* Set up p_access */
STANDARD_READ_ACCESS_INIT;
@@ -283,13 +283,7 @@ static int OpenRedirected( vlc_object_t *p_this, const char *psz_access,
http_auth_Init( &p_sys->auth );
http_auth_Init( &p_sys->proxy_auth );
-
- /* Parse URI - remove spaces */
- p = psz = strdup( p_access->psz_location );
- while( (p = strchr( p, ' ' )) != NULL )
- *p = '+';
- vlc_UrlParse( &p_sys->url, psz );
- free( psz );
+ vlc_UrlParse( &p_sys->url, p_access->psz_location );
if( p_sys->url.psz_host == NULL || *p_sys->url.psz_host == '\0' )
{
More information about the vlc-commits
mailing list