[vlc-devel] Re: vlc: svn commit r12154 (massiot)

Christophe Massiot massiot at via.ecp.fr
Sat Aug 13 11:54:02 CEST 2005


At 11:27 +0300 13/08/05, Rémi Denis-Courmont wrote:
>Le Samedi 13 Août 2005 03:14, Subversion daemon a écrit :
>>  r12154 | massiot | 2005-08-13 02:14:09 +0200 (Sat, 13 Aug 2005) | 7
>>  lines Changed paths:
>>     M /trunk/include/network.h
>>     M /trunk/modules/access/http.c
>>
>>   * modules/access/http.c: Do not use vlc_UrlEncode for the same
>>  reason than [12145]. We just want to replace spaces.
>
>Surely not. All URL-unsafe characters that are not normally part of an
>HTTP URL have to be encoded as well, particularly, but not limited to,
>the non ASCII ones.

Have you ever seen an HTTP URL such as http://toto.com/hou|à/éva/re 
de me/`é in the wild ? Don't forget that the http module only fixes 
the user input, which surely comes from a copy-paste from some place 
on the web. If the web displays invalid URLs it is not our job to fix 
them. The initial bug report only considered spaces, and it is true 
that webbrowser replace spaces with + or %20 when you type in a URL, 
and it is also true that such URLs exist in the wild. But take a look 
at your own browser, mine (Safari) sends non-ascii characters 
unencoded, it only deals with spaces. I would advise not to change 
this behaviour without a new user input.

Anyway, the current behaviour is needed for the HTTP control module, 
otherwise we can't send any variable as a GET variable, so I will 
revert any further change to this function. If you want to change its 
behaviour again, write a new function, and don't call it UrlEncode 
because that is not what URL-encoding is, read the RFC and do some 
PHP/Perl to understand this.

-- 
Christophe Massiot.

-- 
This is the vlc-devel mailing-list, see http://www.videolan.org/vlc/
To unsubscribe, please read http://developers.videolan.org/lists.html



More information about the vlc-devel mailing list