W3C home > Mailing lists > Public > ietf-http-wg@w3.org > April to June 2009

Re: BNF for Cache-Control

From: Julian Reschke <julian.reschke@gmx.de>
Date: Sun, 24 May 2009 11:23:10 +0200
Message-ID: <4A1911FE.3030704@gmx.de>
To: Adrien de Croy <adrien@qbik.com>
CC: HTTP Working Group <ietf-http-wg@w3.org>
Adrien de Croy wrote:
> 
> the production for Cache-control seems to imply that any cache control 
> header can contain any number of cache-request-directive or 
> cache-response-directive.  This means a mixture of both is permissible.
> 
>    Cache-Control = "Cache-Control" ":" 1#cache-directive
>    cache-directive = cache-request-directive | cache-response-directive
> 
> Is this intended?  Surely cache-response-directive are only valid for 
> responses, and cache-request-directive for requests?
> 
> I would have expected something more like:
> 
>    Cache-Control = "Cache-Control" ":" cache-control-request | 
> cache-control-response
>    cache-control-request = 1#cache-request-directive
>    cache-control-response = 1#cache-response-directive
> 
> to enforce separation.
> 
> Apologies if this is already covered in HTTPbis
> ...

There's a limit to what we can (or *want*) express in the ABNF.

If we made that change, a header instance that combined both request and 
response directives would by syntactically invalid. Would that reflect 
what's really desired and implemented? Shouldn't recipients just ignore 
those directives they don't understand?

BR, Julian
Received on Sunday, 24 May 2009 09:23:59 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 27 April 2012 06:51:03 GMT