Hi! I noticed that for numeric hosts requests, Squid 3.2 (transparent)
won't cache them. The problem is that HttpRequest::cacheable()returns
false due to the following check:
if (!flags.hostVerified && (flags.intercepted ||
flags.spoof_client_ip))
return false;
Reason: ClientRequestContext::hostHeaderIpVerify(...) is called for
numeric hosts verification, but it does NOT set
http->request->flags.hostVerified in case of success.
Attached patch fixes the issue.
--
Best wishes,
Alexander Komyagin
--- squid-3.2.0.17-20120415-r11555.orig/src/client_side_request.cc 2012-04-15 13:04:56.000000000 +0400
+++ squid-3.2.0.17-20120415-r11555/src/client_side_request.cc 2012-04-18 13:38:01.259695975 +0400
@@ -540,6 +540,7 @@
for (int i = 0; i < ia->count; i++) {
if (clientConn->local.matchIPAddr(ia->in_addrs[i]) == 0) {
debugs(85, 3, HERE << "validate IP " << clientConn->local << " possible from Host:");
+ http->request->flags.hostVerified = 1;
http->doCallouts();
return;
}