From: wessels <> Date: Wed, 16 Sep 1998 04:05:10 +0000 (+0000) Subject: HEAD fixes (damn I hate HEAD) X-Git-Tag: SQUID_3_0_PRE1~2708 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d657ffad92e8d2b2add019d6fe429be946ce2ec8;p=thirdparty%2Fsquid.git HEAD fixes (damn I hate HEAD) on the server-side, HEAD transfers are always done soon as we make it to the end of the reply headers on the client-side, we can't do IMS for HEAD. Always return cache HITS, never a refresh. httpMaybeRemovePublic() gets bastardized already (thanks henrik). Also make it remove HEAD objects for new GET requests. --- diff --git a/src/client_side.cc b/src/client_side.cc index 630ebfc16d..421a2acb11 100644 --- a/src/client_side.cc +++ b/src/client_side.cc @@ -1,6 +1,6 @@ /* - * $Id: client_side.cc,v 1.396 1998/09/15 20:24:07 wessels Exp $ + * $Id: client_side.cc,v 1.397 1998/09/15 22:05:10 wessels Exp $ * * DEBUG: section 33 Client-side Routines * AUTHOR: Duane Wessels @@ -1133,6 +1133,15 @@ clientCacheHit(void *data, char *buf, ssize_t size) if (checkNegativeHit(e)) { http->log_type = LOG_TCP_NEGATIVE_HIT; clientSendMoreData(data, buf, size); + } else if (r->method == METHOD_HEAD) { + /* + * RFC 2068 seems to indicate there is no "conditional HEAD" + * request. We cannot validate a cached object for a HEAD + * request, nor can we return 304. + */ + if (e->mem_status == IN_MEMORY) + http->log_type = LOG_TCP_MEM_HIT; + clientSendMoreData(data, buf, size); } else if (refreshCheck(e, r, 0) && !http->flags.internal) { /* * We hold a stale copy; it needs to be validated