Re: [squid-users] HOSTNAME AVAILABLE OR NO???

From: Henrik Nordström <hno@dont-contact.us>
Date: Mon, 22 Jul 2002 02:44:20 +0200 (CEST)

I think you got the logics of no_cache inverse (it is a odd directive,
operating inverse to what it's name suggest).. Try the following:

  no_cache allow REFERER

Also make sure you are using Squid-2.5.PRE9 or later.. a bug in the
external_acl_type directive when trying to refer to headers such as
%{Referer} was discovered just before PRE9.. (the bug was introduced in
cleanups just before external_acl got merged into the main Squid sources).

Regards
Henrik

On Sun, 21 Jul 2002, Matt Heaton wrote:

> Henrik, I was wondering if you could give me 30 seconds of your time. I am
> TRYING to use an external ACL to verify that the referer
> contains the hostname, and if not I want it to pass the request along as a
> cache miss. This is what I have now in my squid.conf?
>
> external_acl_type referer concurrency=15 %DST %{Referer}
> /usr/lib/squid/referer.pl
> acl REFERER external referer
> no_cache deny REFERER
>
> Here is my simple perl script that returns OK if the referrer HAS the
> destination domain in it, and ERR if it doesn't.
>
> #!/usr/bin/perl
>
> $|=1;
>
> while (<>) {
> ($dst, $referer) = split;
>
> if ($referer=~/$dst/i) {print "OK\n"; }
> else { print "ERR\n"; }
>
> }
>
> It doesn't work. I just want to check referer, and if it doesn't match then
> no cache it, and if it does match then treat it normally (Ie look for it in
> cache and if not then just pass it along as a normal cache miss)??? While
> I THINK my code is right it obviously doens't work. The docs for external
> acl are a little sparse and since you are the one with supreme knowledge
> about this I thought I would go to the source?? ANY HELP in the matter
> would be VERY helpful.
>
> Thanks,
> Matt Heaton
Received on Sun Jul 21 2002 - 18:44:26 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 17:09:18 MST