Re: WGLC: draft-ietf-appsawg-http-forwarded-02.txt - section 5.1

Julian Reschke wrote:
> The HTTP community has been inventing new microsyntaxes for many years, 
> and as far as I can tell, most header field parsers out there are broken 
> beyond belief. We need less of them, even if this means that a few edge 
> cases will be more verbose than necessary.

This. Each new syntax risks getting it wrong (even if in this case
it ought to be fairly safe) - just look at the horrible horrible
mess that is the history of Set-Cookie.

In addition to the headers I pointed out yesterday that use
close variations on the theme, the definition of Expect appears
to be almost *exactly* this syntax - except that it makes the
value part ( "=" ( token / quoted-string ) ) optional. This allows
for the sending of value-less flags without having to use the
somewhat grotty flag="" construct. Perhaps adopting that syntax
verbatim would be a good idea?

Note also httpbis-p2 S3.1, "Considerations for Creating Header Fields",
particularly:

   Many header fields use a format including (case-insensitively) named
   parameters (for instance, Content-Type, defined in Section 6.8 of
   [Part3]).  Allowing both unquoted (token) and quoted (quoted-string)
   syntax for the parameter value enables recipients to use existing
   parser components.

John
-- 

Received on Tuesday, 15 May 2012 11:15:48 UTC