Re: [squid-users] Squid & url rewriter

From: Amos Jeffries <squid3_at_treenet.co.nz>
Date: Wed, 04 Mar 2009 12:41:07 +1300

Chris Robertson wrote:
> John Doe wrote:
>> From: Merdouille <jgerhards_at_r-advertising.com>
>>
>>> #!/usr/bin/php
>>> $temp = array();
>>> while ( $input = fgets(STDIN) ) {
>>> echo "302:http://www.yahoo.fr/";
>>>
> # Flush output...
> flush();
>>> }
>>> ?>
>>>
>>
>> Maybe try with a '\n'...?
>>
>
> See http://www.squid-cache.org/mail-archive/squid-users/200902/0471.html
> for a recent discussion about why this would be a bad idea.
>

echo and print in PHP and perl IIRC operate slightly differently.

I have found echo "blah\n"; flush(); both to be needed for PHP for
timely results.

The earlier mail was about perl print having an implicit \n already.
echo in PHP does not.

Amos

-- 
Please be using
   Current Stable Squid 2.7.STABLE6 or 3.0.STABLE13
   Current Beta Squid 3.1.0.6
Received on Tue Mar 03 2009 - 23:40:39 MST

This archive was generated by hypermail 2.2.0 : Wed Mar 04 2009 - 12:00:02 MST