Re: [squid-users] X-Cache regex need some help

From: Amos Jeffries <squid3_at_treenet.co.nz>
Date: Thu, 02 Jul 2009 22:52:40 +1200

Chudy Fernandez wrote:
> header:
> X-Cache HIT from Server
>
> the following doesn't work
> acl hit rep_header X-Cache HIT\ from\ Server
> or
> acl hit rep_header X-Cache HIT.from.Server
> or even
> acl hit rep_header X-Cache HIT.*Server
> it only match for
> acl hit rep_header X-cache HIT
>
> I'm using this for
> log_access deny hit
>
> I'm wondering "from Server" is some kind of code?
>

Two issues here.

The header is created by:
   HDR_X_CACHE, "%s from %s", (is_hit?"HIT":"MISS"), getMyHostname());

So the word "Server" in the above pattern will vary for each install of
Squid.

I would expect pattern 2,3,4 to work if the right hostname is entered.

Spaces are currently not permitted in the ACL lines of squid.conf,
whether "quoted" or \ 'd . To do this there is a hack the Windows
people use, putting the data for the ACL into a file. One entry per line
which _can_ take whitespace. And naming the file in the ACL definition.

Amos

-- 
Please be using
   Current Stable Squid 2.7.STABLE6 or 3.0.STABLE16
   Current Beta Squid 3.1.0.9
Received on Thu Jul 02 2009 - 10:52:47 MDT

This archive was generated by hypermail 2.2.0 : Thu Jul 02 2009 - 12:00:01 MDT