squid 3.2 doesn't cache requests for numerical hosts

From: Alexander Komyagin <komyagin_at_altell.ru>
Date: Wed, 18 Apr 2012 13:47:31 +0400

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

Received on Wed Apr 18 2012 - 09:51:40 MDT

This archive was generated by hypermail 2.2.0 : Fri Apr 20 2012 - 12:00:10 MDT