Re: [squid-users] url_rewrite_concurrency

From: Gemmy <chenryn_at_163.com>
Date: Thu, 08 Apr 2010 14:03:26 +0800

It's OK now.Thanks a lot~

2010-4-8 12:15, Amos Jeffries wrote:
> On Thu, 08 Apr 2010 11:24:27 +0800, Gemmy<chenryn_at_163.com> wrote:
>
>> Hi~
>> I have a squid running url_rewrite_program, but when I using
>> "url_rewrite_concurrency" in squid.conf, rewrite failed. The access.log
>> like that:
>>
>> 1270692467.083 0 127.0.0.1 TCP_MEM_HIT/200 29514 GET
>>
>>
> http://drag.g1d.net/%D3%C2%B4%B3%B6%E1%C3%FC%B5%BA.mp40drag?__0.9956639306
>
>> - NONE/- text/xml "-" "Wget/1.10.2 (Red Hat modified)"
>> 1270692470.083 32 127.0.0.1 TCP_MISS/200 29507 GET
>> http://drag.g1d.net/%D3%C2%B4%B3%B6%E1%C3%FC%B5%BA.mp40drag?__0.9956639
>> - DIRECT/119.167.214.28 text/xml "-" "Wget/1.10.2 (Red Hat modified)"
>> 1270692476.604 32 127.0.0.1 TCP_MISS/200 29507 GET
>> http://drag.g1d.net/%D3%C2%B4%B3%B6%E1%C3%FC%B5%BA.mp40drag?__0.99 -
>> DIRECT/119.167.214.28 text/xml "-" "Wget/1.10.2 (Red Hat modified)"
>>
>> My squid.conf and rewrite_program as follows:
>>
>> acl rewriteurl url_regex -i ^http://drag.g1d.net/.*\.mp40drag\?
>> url_rewrite_access deny !rewriteurl
>> url_rewrite_program /home/squid/etc/redirect.pl
>> url_rewrite_children 5
>> url_rewrite_concurrency 5
>>
>> #!/usr/bin/perl -wl
>> use strict;
>> $|=1;
>> while (<>)
>> {
>> my ($uri,$client,$ident,$method) = ( );
>> ($uri, $client, $ident, $method) = split;
>>
>> if ($uri =~m#^(.*)(\?.*)#i)
>> {
>> my ($url,$strings) = ($1,$2);
>> print "$url\n";
>> }
>> else
>> {
>> print "$uri\n";
>> }
>> }
>>
>> Is anything wrong?
>>
> Yes. Concurrency is a slightly different helper protocol. Your helper does
> not understand it.
> http://wiki.squid-cache.org/Features/Redirectors#How_do_I_make_it_concurrent.3F
>
> Amos
>
>
Received on Thu Apr 08 2010 - 06:03:34 MDT

This archive was generated by hypermail 2.2.0 : Thu Apr 08 2010 - 12:00:03 MDT