W3C home > Mailing lists > Public > uri@w3.org > October 2004

Re: file: URI scheme

From: Gisle Aas <gisle@ActiveState.com>
Date: 29 Sep 2004 04:13:05 -0700
To: Graham Klyne <GK@ninebynine.org>
Cc: Mike Brown <mike@skew.org>, uri@w3.org
Message-ID: <lrd605qqf2.fsf@caliper.activestate.com>

> > > For MS-Windows
> > > --------------
> > > filename->URI:
> > > If filename starts with x:... (with 'x' a letter), a leading '/' is
> > > added.  Convert all '\' characters to '/'.  Apply URI escaping as needed
> > > (including to any '?' and '#' characters).  The URI is formed by append the
> > > resulting string to file://

With this scheme it would also be helpful to explain how relative URIs
are resolved.  For example from the document file:///c:/xxx.html I
might have links taking me to:


Are any of these valid references to the "file:///c:/foo.html"

MSIE resolves these as:


FireFox resolves these as:


For the Perl URI module I used to try to map the drive to the
authority component, i.e. c:\foo.html became file://c:/foo.html.  This
made it possible to map absolute and relative file names to URIs and
then use the standard URI rules for resolving absolute names that
ended up consistent with what the OS rules for resolving the
corresponding file names are.  The disk drives are really separate
namespaces (for relative references) and that is basically what the
authority component is supposed to name.

I liked that mapping but apparently nobody else did, so recent
versions of URI.pm has started to produce these tripple slash URLs

Gisle Aas
Received on Friday, 1 October 2004 17:16:36 UTC

This archive was generated by hypermail 2.4.0 : Sunday, 10 October 2021 22:17:46 UTC