Re: grammar fix for path

At 18:51 25/03/04 -0800, Roy T. Fielding wrote:

>On Tuesday, February 17, 2004, at 04:01  AM, Ray Merkert wrote:
>>I was just in the middle of looking at IRIs, when I noticed something 
>>strange. It seems the
>>URI 'http://w3c.org:80path1/path2' has become a valid URI, at least 
>>according to the
>>collected BNF grammar in draft-fielding-uri-rfc2396bis-04.txt.
>
>I have tried various ways of explaining it in the text and finally
>went back to multiple definitions of path, though I hope I've done
>a better job of disambiguating the different cases than I did for
>2396.  I would appreciate it if the grammar-driven parsing experts
>could have a look at
>
>    http://gbiv.com/protocols/uri/rev-2002/rfc2396bis.html  (or .xml)
>
>and see if the new ABNF rules work (I've already tested them with
>the abnf.c tool).

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.)

#g


------------
Graham Klyne
For email:
http://www.ninebynine.org/#Contact

Received on Friday, 26 March 2004 05:14:03 UTC