Search squid archive

storeurl_rewite_program is being run, but result is not used (2.7)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I've built a storeurl_rewrite_program (which strips some changing
query-strings), and verified from logging in the script that it is
being run and generating the desired modified url. However, access.log
continues to show TCP_MISS and store.log has SWAPOUT with the
unmodified url.

Why would Squid run the rewriter and then throw away the result?

Edits to stock squid.conf:
+cache_dir ufs /tmp/squid 100 16 256
+access_log /tmp/squid/logs/access.log squid
+cache_log /tmp/squid/logs/cache.log
+cache_store_log /tmp/squid/logs/store.log
+pid_filename /tmp/squid/squid.pid
+storeurl_rewrite_program /path/to/storeurl.pl <http://storeurl.pl> <http://storeurl.pl> +acl storeurl_rewrite_list dstdomain api.meetup.com <http://api.meetup.com> <http://api.meetup.com>
+storeurl_access allow storeurl_rewrite_list
+storeurl_access deny all
+cache allow all
+refresh_pattern api.meetup.com <http://api.meetup.com> <http://api.meetup.com> 1440 90%
 14400 ignore-no-cache
override-expire ignore-private


#!/opt/local/bin/perl
$|=1;
while (<>) {
 @X = split;
 $url = $X[0];

 open(LOG,">>/tmp/squid/logs/rewrite.log") || die("Log file will not
open");
 print LOG ">".$url."\n";

 if ($url =~
s@^http://api\.meetup\.com(.*)callback=jsonp[0-9]+&_=[0-9]+&@http://api.meetup.com$1@)
{$url = 'foo';}

 print LOG "<".$url."\n";
 close(LOG);
 print $url . "\n";

}

[Index of Archives]     [Linux Audio Users]     [Samba]     [Big List of Linux Books]     [Linux USB]     [Yosemite News]

  Powered by Linux