RE: Status of RFC 1738 -- 'ftp' URI scheme

> From: Daniel R. Tobias [mailto:dan@tobias.name]
> Sent: Tuesday, 11 January, 2011 20:50
> To: URI
> Cc: Michael Wojcik
> Subject: Re: Status of RFC 1738 -- 'ftp' URI scheme
> 
> On 11 Jan 2011 at 10:59, Michael Wojcik wrote:
> 
> > Principle of least surprise: The "file" scheme has historically been
> > treated as referring only to local resources.
> 
> Then why was it designed with an authority component at all?

Because the file-scheme URL is a specialization of the generic URL, and
the authority component is part of the generic URL.

Omitting the authority component from the syntax would complicate
parsing:

	URL ::= file-URL other-URL
	file-URL ::= "file://" path
	other-URL ::= scheme "://" authority "/" path

That's an unnecessary extra branch on the tree, which can be eliminated
simply by including an authority component in the file-scheme URL. Then
there are no syntactic differences between the file-scheme URL and other
URLs; allowing an empty authority for the file scheme can be handled as
a semantic rule (as can any other schematic differences in handling
authorities), and a URL parser does not have to treat the file scheme as
a special case.

-- 
Michael Wojcik
Principal Software Systems Developer, Micro Focus




This message has been scanned for viruses by MailController - www.MailController.altohiway.com

Received on Wednesday, 12 January 2011 21:10:06 UTC