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

Re: grammar fix for path

From: Roy T. Fielding <fielding@gbiv.com>
Date: Thu, 1 Apr 2004 16:56:53 -0800
Cc: uri@w3.org
To: Graham Klyne <GK@ninebynine.org>
Message-Id: <A188B4C2-8440-11D8-94BA-000393753936@gbiv.com>

> I'll try this out when I have some time... it may be a week or so.  
> meanwhile, a quick point of confirmation concerning:
> [[
> If a URI contains an authority component, then the path component must 
> either be empty or begin with a slash ("/") character. If a URI does 
> not contain an authority component, then the path cannot begin with 
> two slash characters ("//"). In addition, a URI reference (Section 
> 4.1) may begin with a relative path, in which case the first path 
> segment cannot contain a colon (":") character. The ABNF requires five 
> separate rules to disambiguate these cases, only one of which will 
> match a given URI reference. We use the generic term "path component" 
> to describe the URI substring that is matched by the parser to one of 
> these rules.
> ]]
> This suggests to me that the minimal authority "//" is distinct from 
> having no authority at all, which I think is fine.  In particular, I 
> think the above text means that it is not OK to remove a minimal "//" 
> authority from a URI.  (I always believed this to be the case, but I 
> have encountered software that does remove "blank" authorities.)

They are certainly distinct for parsers -- otherwise, there would be no
way to round-trip the parsed version back to a reference.  However,
normalization is a different creature.  It might be okay to remove an
empty authority if such an equivalence is defined for the scheme,
as it is for a file URI if the path does not begin with "//".

Received on Thursday, 1 April 2004 20:26:39 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:25:07 UTC