Re: #168: understanding CC directives

On 02.06.2010 07:55, Mark Nottingham wrote:
> p6 currently states:
>
>    The "Cache-Control" general-header field is used to specify directives that
>    &MUST; be obeyed by all caches along the request/response chain.
>
> but as Jamie points out in<http://trac.tools.ietf.org/wg/httpbis/trac/ticket/168>, this doesn't work so well with extension CC directives.
>
> I think the intent is preserved with:
>
> """
>    The "Cache-Control" general-header field is used to specify directives for caches along the request/response chain. HTTP/1.1 caches
> MUST obey the requirements of the Cache-Control directives defined in this section. See [ref to CC extensions] for information about how Cache-Control directives defined elsewhere are handled.
> """
>
> Thoughts?

Looks good to me. That being said, I rearranged the sentences and ended 
up with:

3.2.  Cache-Control

    The "Cache-Control" general-header field is used to specify
    directives for caches along the request/response chain.  Such cache
    directives are unidirectional in that the presence of a directive in
    a request does not imply that the same directive is to be given in
    the response.

    HTTP/1.1 caches MUST obey the requirements of the Cache-Control
    directives defined in this section.  See Section 3.2.3 for
    information about how Cache-Control directives defined elsewhere are
    handled.

       Note: HTTP/1.0 caches might not implement Cache-Control and might
       only implement Pragma: no-cache (see Section 3.4).

    Cache directives MUST be passed through by a proxy or gateway
    application, regardless of their significance to that application,
    since the directives might be applicable to all recipients along the
    request/response chain.  It is not possible to target a directive to
    a specific cache.

      Cache-Control   = "Cache-Control" ":" OWS Cache-Control-v
      Cache-Control-v = 1#cache-directive

      cache-directive = cache-request-directive
         / cache-response-directive

      cache-extension = token [ "=" ( token / quoted-string ) ]

(see 
<http://trac.tools.ietf.org/wg/httpbis/trac/attachment/ticket/168/i168.diff>).

Ticket 168 furthermore mentions:

> Furthermore, the BNF doesn't make it clear that request and response directives shouldn't be intermixed;
>
>     Cache-Control-v = 1#cache-directive
>
>     cache-directive = cache-request-directive
>
>         / cache-response-directive

That could be addressed by saying:

      Cache-Control-v = 1#cache-request-directive
                      / 1#cache-response-directive

However, I'm not sure we need to express this as a syntactical 
constraint (and it also might confuse people with respect to whether 
this header uses the "list style" or not).

Best regards, Julian

Received on Wednesday, 2 June 2010 08:46:36 UTC