[vlc-devel] Re: [RFC] sanitize MRL format

Damien Fouilleul damien.fouilleul at laposte.net
Fri Jun 15 13:09:23 CEST 2007


Laurent Aimar wrote:
> On Fri, Jun 15, 2007, Rémi Denis-Courmont wrote:
>   
>> On Fri, 15 Jun 2007 10:10:11 +0100, Damien Fouilleul
>> <damien.fouilleul at laposte.net> wrote:
>>     
>>> well, i've always been a pragmatic guy, i don't like restricting users
>>> more than it is strictly necessary. Regarding the MRL format, whether
>>> it's lame or not, i have no problem allowing format such as udp:1.2.3.4
>>> as long as the meaning is unambiguous, i mean firefox has no problem
>>> accepting file:c: and will dutifuly convert it as file:///c:/. Sometimes
>>> the 'right' URL format is more confusing than the lame version ;)
>>>       
>> That works because you use a platform that has restrictions on filenames,
>> due to a prehistoric legacy file system hierarchy commonly known as
>> "drive letters".
>>
>> On platforms where colon is allowed, this whole idea does not work.
>> And it's not theoretical: we've had a bunch of complaints about not
>> being able to open media files with colon into them.
>>
>> And I would rather have a consistent URL handling across platforms.
>>     
>
>  On not well formed url like x:y there is an amiguity if it is a file 
> or an url (if 'x' is a valid access name).
>  I think in this case we could favour file and then protocol if is not a file.
>  All we need would be a little check with stat() in InputSourceInit before
> calling MRLSplit (and prepend file:// when needed)
>  What do you think ?
>
>   
yes, that makes sense, i would sign up for that. However, just to be the 
devils advocate, on UNIX, you can still reference a file through 'x://y' 
(although you really need to have a twisted mind to so so), ie.

$ mkdir "udp:"
$ echo lala > "udp://1.2.3.4"

so what happen then when you launch vlc and open "udp://1.2.3.4", should 
vlc turn it into 'file://udp://1.2.3.4' ?



-- 
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