Re: #307 (untangle Cache-Control ABNF)

On 13/06/2012, at 6:57 AM, Julian Reschke wrote:
> 
> --- NEW ---
>   Cache directives are identified by a token, to be compared case-
>   insensitively, and have an optional argument, that can use both token
>   and quoted-string syntax.  For the directives defined below,
>   recipients ought to accept both forms, even if one is documented to
>   be preferred.  For any other directive, recipients MUST accept both
>   forms.
> 
>     Cache-Control   = 1#cache-directive
> 
>     cache-directive = token [ "=" ( token / quoted-string ) ]
> 
>   For the cache directives defined below, no argument is defined (nor
>   allowed) otherwise stated otherwise.
> --- NEW ---

A few things:

* You need to qualify the requirement so that it applies only to directives that take an argument

* The MUST still seems fairly strong; I'd be more comfortable with a SHOULD

* Isn't the requirement more appropriate in 3.2.3 Cache Control Extensions?


> --- NEW ---
>   Note: the preferred syntax for this argument is "token".  For
>   compatibility with non-robust recipients, arguments SHOULD be sent
>   using the token syntax.
> --- NEW ---


Here and elsewhere, the quotes around the token are confusing, and the language is slightly revisionist (max-age, for example, has never been defined to use quotes).

Suggest replacing with:

Note: This cache-control directive uses the token form of the argument; e.g., 'max-age=5', not 'max-age="5". Senders SHOULD NOT use the quoted-string form.



--
Mark Nottingham   http://www.mnot.net/

Received on Wednesday, 13 June 2012 03:17:49 UTC