W3C home > Mailing lists > Public > ietf-http-wg@w3.org > January to March 2007

Updating Entity Headers with 304s

From: Mark Nottingham <mnot@mnot.net>
Date: Sat, 10 Feb 2007 16:41:04 +1100
Message-Id: <B4871E7F-B0E4-40BF-B647-5D3E40EAFDEA@mnot.net>
To: "ietf-http-wg@w3.org Group" <ietf-http-wg@w3.org>

10.3.5 says:

[[[
If the conditional GET used a strong cache validator (see section  
13.3.3), the response SHOULD NOT
include other entity-headers. Otherwise (i.e., the conditional GET  
used a weak validator), the response
MUST NOT include other entity-headers; this prevents inconsistencies  
between cached entity-bodies
and updated headers.
]]]

That applies to the responses; it doesn't specify the behaviour of  
the cache when it receives such
responses.

it goes on to say

[[[
If a cache uses a received 304 response to update a cache entry, the  
cache MUST update the entry to
reflect any new field values given in the response.
]]]

and 13.5.3 goes on

[[[
The end-to-end headers stored in the cache entry are used for the  
constructed response, except that
[...]
       - any end-to-end headers provided in the 304 or 206 response MUST
         replace the corresponding headers from the cache entry.
Unless the cache decides to remove the cache entry, it MUST also  
replace the end-to-end headers
stored with the cache entry with corresponding headers received in  
the incoming response, except for
Warning headers as described immediately above. If a header field-  
name in the incoming response
matches more than one header in the cache entry, all such old headers  
MUST be replaced.

In other words, the set of end-to-end headers received in the  
incoming response overrides all
corresponding end-to-end headers stored with the cache entry (except  
for stored Warning headers with
warn-code 1xx, which are deleted even if not overridden).
]]]

My strict reading of this is that the intent was to discourage  
updating entity headers with 304 responses, but if it were to happen,  
to make sure that it was done correctly (i.e., all together).

However, an implementer has interpreted the stated intent to mean  
that a cache should not allow entity headers to be updated by 304s.  
See: <http://issues.apache.org/bugzilla/show_bug.cgi?id=39647>.

There's a certain logic to both positions. Does anyone recall what  
the original intent was, and do we need a clarification here?


--
Mark Nottingham     http://www.mnot.net/
Received on Saturday, 10 February 2007 05:41:21 GMT

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