* Gisle Aas wrote:
>> As far as I can tell, RFC 1738, section 3.10, as well as the BNF in
>> section 5 explicitly say that file: URI must have two forward slashes
>> before the optional hostname, followed by another forward slash, and
>> then the path.
>
>RFC 1738 is becoming a bit stale.  I do believe that the intent is for
>'file' URIs to also follow the RFC 2396 syntax for hierarchical
>namespaces which clearly states at the 'authority' is optional.

http://www.ietf.org/internet-drafts/draft-hoffman-file-uri-00.txt has
been published a few weeks ago, and there is an (ongoing?) discussion
http://lists.w3.org/Archives/Public/uri/2004Aug/thread.html#58 on the
future of the draft.

>Sure.  Especially if I'm told about more apps that can't inter operate
>with authority-less-file-URIs.  I might want to make it an option.

A C# program with

  Console.WriteLine((new Uri("file:///x")).LocalPath);
  Console.WriteLine((new Uri("file:///x:/y")).LocalPath);
  Console.WriteLine((new Uri("file:///x|/y")).LocalPath);
  Console.WriteLine((new Uri("file://x/y")).LocalPath);
  Console.WriteLine((new Uri("file:/x")).LocalPath);

running on Microsoft .NET 1.1 would print

  \\x
  x:\y
  x:\y
  \\x\y

and then

  Unhandled Exception: System.UriFormatException: Invalid URI:
  The format of the URI could not be determined.

for the file:/x case.

Reply via email to