Re: Issue in ABNF syntax for the User-Agent: header

Antti-Juhani Kaijanaho <[email protected]> Tue, 3 Nov 2009 20:15:27 +0200
Newsgroups gmane.ietf.usenet.format
Message-ID <[email protected]>
On Tue, Nov 03, 2009 at 06:31:42PM +0100, Julien ÉLIE wrote:
> >>I read in USEFOR:
> >>
> >>  user-agent      =  "User-Agent:" SP 1*product [CFWS] CRLF
> >>  product         =  [CFWS] token [ [CFWS] "/" product-version ]
> >>  product-version =  [CFWS] token
> >>
> >>and in RFC 2045:
> >>
> >>    token := 1*<any (US-ASCII) CHAR except SPACE, CTLs,
> >>                or tspecials>
> >>
> >>    tspecials :=  "(" / ")" / "<" / ">" / "@" /
> >>                  "," / ";" / ":" / "\" / <"> /
> >>                  "/" / "[" / "]" / "?" / "="
> >>                  ; Must be in quoted-string,
> >>                  ; to use within parameter values

> Because a parenthesis, for instance "(", is NOT allowed in a token.

Of course not - but the parenthetical statements are not tokens, they are
CFWSs, which are allowed between tokens in the grammar quoted above.

> I believe USEFOR should introduce the notion of a comment here (which allows
> such a construction, as RFC 2626 does), besides the product.

No need to introduce - it already allows them.

-- 
Antti-Juhani Kaijanaho, Jyväskylä, Finland
http://antti-juhani.kaijanaho.fi/newblog/
http://www.flickr.com/photos/antti-juhani/