[vlc-devel] "file://localhost/" handling in input.c on win32

Michael A. Puls II shadow2531 at gmail.com
Mon Aug 22 23:43:38 CEST 2011


On Mon, 22 Aug 2011 02:28:54 -0400, Rémi Denis-Courmont <remi at remlab.net>  
wrote:

> On Mon, 22 Aug 2011 00:06:55 -0400, "Michael A. Puls II"
> <shadow2531 at gmail.com> wrote:
>> If Opera passes a file URI to vlc like this:
>>
>> vlc.exe file://localhost/test.mp3
>>
>> , vlc reports:
>>
>> File reading failed:
>> VLC could not open the file "\\localhost\c:\test.mp3".
>> Your input can't be opened:
>> VLC is unable to open the MRL 'file://localhost/c:/test.mp3'. Check the
>> log for details.
>
> VLC follows the standard defined by Microsoft for file:// URIs.

5.3.3. in RFC3987 mentions this "localhost" issue generally and says that  
it can be equivalent to an empty domain.

<http://tools.ietf.org/html/draft-hoffman-file-uri-03> in section 2  
mentions this explicitly.

Firefox, Chrome and Safari on Win32 convert "file://localhost/" to  
"file:///".

wmplayer.exe will play "file://localhost/c:/test.mp3" like it does with  
"file:///c:/test.mp3".

The code I mentioned in input.c seems to recognize the general issue.

> This is an Opera bug in my opinion. Local files are supposed to be
> specified without a host name.

Opera's file URI handling throughout its codebase uses "file://localhost/"  
per the rfc mentioned above. They do not consider it a bug. It's  
intentional.

Given all that, would you be willing to work around it, even if you don't  
agree with Opera?

Thanks

-- 
Michael



More information about the vlc-devel mailing list