On Fri, 31 Dec 2004, Rajesh K. Gupta wrote:

When a web-browser requests a URL (redirection enabled), Squid returns
nothing to the browser (and browser continues to wait for response).

The redirection program is being executed (simple perl script) which
just returns a blank line. (no URL modification occurs).

#start simple redirect, which really does not redirect yet
#!/usr/bin/perl

while (<>) {
  print "\n";
}
#end simple redirect


You need to disable stdout buffering in Perl, if not the response from your program gets buffered by the libc stdio routines and never reaches Squid.

At the top of the script before the while insert

$|=1;

Regards
JHenrik

Reply via email to