Re: HEAD and max-age=0

From: Robert Collins <robertc@dont-contact.us>
Date: 08 Sep 2002 20:30:22 +1000

On Sun, 2002-09-08 at 20:15, Henrik Nordstrom wrote:
> The comment is most likely drawn from the fact that there is no
> mentioning of HEAD in 10.3.5 304 "Not modified", only GET, and the
> restrictions set in section 10.
>
> Seems to read the same in RFC2616.
>
> But on the other hand I don't see anything that says that we MUST NOT
> send 304 in response to a HEAD, so my interpretation is that clients
> should not expect servers to support conditional HEAD requests, but
> if the server wishes to it MAY. This conclusion is from the
> extensibility of the protocol and from the fact that HEAD in all
> other aspects is defined to be identical to GET except that no reply
> entity body is returned in the response.
>
> Should perhaps add that this is also the interpretation done by the
> Apache group, and most other server vendors (MS IIS included, even if
> they often get HEAD very wrong and returns a reply entity body..).

That comment exists where we are deciding whether to forward a request
or not, not whether we want to return a 304 or not.

ie:
HEAD foo HTTP/1.1
Cache-Control: max-age=foobar
Host: bar

in squid-HEAD, this returns a HIT if it exists, EVEN if max-age is much
less than the object age. Thats plain wrong IMO.

We need to validate the object with the origin, and IF it validates on
an IMS, we can reply with HEAD from cache, otherwise we need to flush
the oldobject and reply with HEAD from the new one.

Rob

Received on Sun Sep 08 2002 - 04:29:51 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:16:29 MST