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

updating headers with 304 responses

From: Adrien de Croy <adrien@qbik.com>
Date: Fri, 05 Jun 2009 19:12:59 +1200
Message-ID: <4A28C57B.5060507@qbik.com>
To: HTTP Working Group <ietf-http-wg@w3.org>

There's a requirement in RFC2616 to use headers included in 304 
responses to either invalidate or update cached entries.

Specifically it looks like if the 304 response returns a different value 
to what is stored, for any of


Then the cache must invalidate the stored entry.  This is fine, until 
you hit IIS which seems to be returning a Content-Length: 0 in all 304 

I guess that since the 304 message has no entity body, the 
Content-Length of 0 is understandable, if not maybe misguided?  Or is it 

Is it legal in a 304 response to include a Content-Length value other 
than 0?  It's not like a HEAD command, this is a 304 response to a 
conditional GET.  Additionally 304 responses are prohibited from having 
an entity body.

The rules for message length imply that with a 304 response, the 
Content-Length header does not specify the message length.  So it's just 

So should I assume that this is just a bug on the part of this IIS 
server?  What do others do?  It causes problems obviously to invalidate 
the cache entry because of this.



Adrien de Croy - WinGate Proxy Server - http://www.wingate.com
Received on Friday, 5 June 2009 07:10:25 UTC

This archive was generated by hypermail 2.4.0 : Thursday, 2 February 2023 18:43:19 UTC