questions as a diff

timeless timeless at gmail.com
Sun Mar 29 09:47:16 UTC 2009


Christian Ebert <blacktrash at gmx.net> wrote:
>> it happens that for file://host/ the host has to be an alias for localhost.
>
> file://127.0.0.1/ is also allowed, or the return of hostname.
>
> Long ago I submitted a patch that tried to cover all this, but
> as it tries to cover it all, it's also longwinded:
>
> http://www.selenic.com/pipermail/mercurial-devel/2007-September/002837.html

hrm...

so... in browsers, for file://foo/bar, the only values of foo that are
legal are values of foo which alias to localhost (or any other ip
which means the local computer).

if someone wants to use smb or a similar system to in a file: url,
they are supposed to use: file://///hostname/path/

http://forums.mozillazine.org/viewtopic.php?f=38&t=181462

the "logic" behind this is:
[file://]{null}[/][//hostname][/path]

protocols w/ hosts start as <proto:>//<host>
for file, because of security issues and confusion, the host field is
null if you want to access a remote server. the SMB notation is
\\hostname, so it's converted to //hostname (and in fact the samba
impl wants you to use //hostname for its arguments)



More information about the Mercurial-devel mailing list