Re: [squid-users] url_rewrite_program receives empty lines as input

From: Amos Jeffries <squid3_at_treenet.co.nz>
Date: Wed, 07 May 2014 21:45:08 +1200

On 7/05/2014 2:37 p.m., Eliezer Croitoru wrote:
> Hey there,
>
> I will try my Mind-reading technique on you if you are fine with it:
> You are using squid 3.4.X??
> (just wondering)
>
> When the helper gets empty lines it means that it probably ended it's
> life-cycle and it's recommended to do a clean exit of the helper.(from
> my experience).
> in what language is thie url_rewrite helper written?

Perl by that syntax.

This shutdown condition is why the bundled helpers are all written with
their loops like this:

  while (<>) {
    my $line(x,y,z) = split;
    ...

or,

  while (<STDIN>) {
    my $line(x,y,z) = split;
    ...

Amos

>
> Eliezer
>
> On 05/05/2014 10:34 AM, Javier Amor Garcia wrote:
>> Hello,
>>
>>
>> I have a problem with the url_rewrite_program, sometimes it receives a
>> blank line as input. Normally, it works fine but when begins to receive
>> empty lines, it receives them continually. I don't know what triggers it.
>>
>> The rewrite script is like this:
>>
>> while (1) {
>> my $line = <>;
>> ... process and return ..
>> }
>>
>> I can see the empty lines debugging just after the assignation of the
>> read line to the line variable.
>>
>> The configuration of the squid is a bit complicate, I have two squid
>> sandwiching a dansguardian. The url_rewrite_program is in the internal
>> squid. I have not seen this problem when I remove dansguardian but it
>> maybe just by chance.
>>
>> Regards,
>>
>> Javier
>
Received on Wed May 07 2014 - 09:45:21 MDT

This archive was generated by hypermail 2.2.0 : Wed May 07 2014 - 12:00:04 MDT