W3C home > Mailing lists > Public > whatwg@whatwg.org > October 2012

Re: [whatwg] URL: file: URLs

From: Mikko Rantalainen <mikko.rantalainen@peda.net>
Date: Wed, 31 Oct 2012 10:27:10 +0200
Message-ID: <5090E0DE.7040209@peda.net>
To: whatwg@lists.whatwg.org
João Eiras, 2012-10-31 01:41 (Europe/Helsinki):
> In both Firefox and Chrome if you type file://aaa/some/path, or
> file://localhost/some/path, the aaa and localhost parts are ignored, and
> the rest of the path is interpreted as a local file path. In Opera,
> anything that is not localhost gives an error.

How about following:

(1) file://c:/foo tries to connect to server "c:" and request shared
entity "foo".

(2) file://foo/bar tries to connect to server "foo" and request shared
entity "bar"

(3) file:///c:/foo tries to refer to localhost path /c:/foo which in
windows environment would be interpreted as local C:\foo,
POSIX-compatible systems would try literal /c:/foo (colon is a valid
character in the path name).

(4) file://localhost/c:/foo is identical to (3) above.

I understand that (1) would behave different from some legacy user
agents but there really is not interoperability with such file URLs so I
guess that does not matter too much.

Some legacy user agents also support URLs such as

(5) file:///c|/foo which is considered equal to (3). I have no idea why
the pipe is considered better character than colon here.

Some problematic URLs are still possible:

(6) file:///foo/bar should refer to entity "/foo/bar" in
POSIX-compatible systems but I have no idea where it would map to with
windows-style drive letter naming at the start of the local path.

Received on Wednesday, 31 October 2012 08:27:28 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:46 UTC