]> git.ipfire.org Git - thirdparty/squid.git/commit - src/access_log.cc
Bug #1548: Cleanup of 304 processing
authorhno <>
Thu, 8 Jun 2006 04:39:33 +0000 (04:39 +0000)
committerhno <>
Thu, 8 Jun 2006 04:39:33 +0000 (04:39 +0000)
commit1d7ab0f482a9ddeee368a7ab80174023eea0ab51
treed91176b814aaf4fb43f9ab9c6f615e1e96f5b0ef
parentfb53c31fd7a712f351a923bb5f798551c01b063d
Bug #1548: Cleanup of 304 processing
by Doug Dixon <doug.dixon@gmail.com>

The main change is to the logging codes. Since all refreshes hit the origin, it
does not make any sense to refer to them as HIT or MISS. Instead, they have
been renamed to describe the result from the origin server:

* TCP_REFRESH_UNMODIFIED - The requested object was cached but STALE. The IMS
query for the object resulted in "304 not modified".

* TCP_REFRESH_FAIL - The requested object was cached but STALE. The IMS query
failed and the stale object was delivered.

* TCP_REFRESH_MODIFIED - The requested object was cached but STALE. The IMS
query returned the new content.

These actually fit the FAQ now (if you change the names):
http://www.squid-cache.org/Doc/FAQ/FAQ-6.html#ss6.7

Apart from that:

1. I've corrected the set of headers that should NOT be updated in an existing
cache entry on receipt of a 304 from the origin (i.e. hop-by-hop headers)
2. I've removed a couple more functions and put the code inline. It's easier to
follow.

only allowing the entity-headers specified as being cool for 304
(section 10.3.5) to update an entry:

Content-Location
Expires

All the other entity-headers are either a SHOULD NOT or MUST NOT for including
with a 304 anyway, so always ignore these when updating an entry:

Allow
Content-Encoding
Content-Language
Content-Length
Content-MD5
Content-Range
Content-Type
Last-Modified
src/HttpHeader.cc
src/HttpHeader.h
src/HttpReply.cc
src/access_log.cc
src/client_side.cc
src/client_side_reply.cc
src/client_side_reply.h
src/enums.h