This patch is part of the patchset I'm using in the Debian squid-2.4.3
package. Though the patches here are against 2.4.3, they should apply
to 2.5 with minor difficulty.
icp_hit_stale.patch Don't return 504 on cache-only requests for
stale objects if icp_hit_stale is on.
Date: Sat, 15 Jul 2000 10:42:59 +1000
Message-Id: <200007150042.e6F0gwU25807@gondor.apana.org.au>
From: <herbert@gondor.apana.org.au>
Subject: squid: [PATCH] Make icp_hit_stale useful again
To: submit@bugs.debian.org
X-Mailer: bug 3.3.4
Delivered-To: submit@bugs.debian.org
Package: squid
Version: 2.2.5-3
Severity: normal
Recent versions of squid will return 504 when a client makes a cache-only
request and the object happens to be stale.
This effectively makes icp_hit_stale because in that case the object is
almost guaranteed to be stale and if the client is a sibling squid, it will
always be cache-only.
The follow patch addresses this by check for icp_hit_stale in this case.
diff -ruN squid-2.4.1.orig/src/client_side.c squid-2.4.1/src/client_side.c
--- squid-2.4.1.orig/src/client_side.c Sun Mar 4 01:55:10 2001
+++ squid-2.4.1/src/client_side.c Thu Mar 22 21:05:08 2001
@@ -352,7 +352,7 @@
* @?@: Instead of a 504 (Gateway Timeout) reply, we may want to return
* a stale entry *if* it matches client requirements
*/
- if (clientOnlyIfCached(http)) {
+ if (clientOnlyIfCached(http) && !Config.onoff.icp_hit_stale) {
clientProcessOnlyIfCachedMiss(http);
return;
}
Received on Mon Dec 10 2001 - 19:03:55 MST
This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:14:40 MST