Re: grammar fix for path

> 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 "//".

....Roy

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