Re: [squid-users] Authenticating from Perl

From: Henrik Nordstrom <henrik@dont-contact.us>
Date: Thu, 07 Sep 2006 13:53:23 +0200

ons 2006-09-06 klockan 20:32 -0500 skrev Kevin Gordon:
> Hey ,
> I am trying to do a simple authentication script in perl.
>
>
> The Code
>
> #!/usr/bin/perl
> $| = 1;
>
> $userInfo = <STDIN>;
>
> open(lg, ">what.log");
> print lg "$userInfo\n";
> close(lg);
>
> print "OK";

You need to loop over STDIN until EOF, processing requests from Squid.

while ($userInfo = <STDIN>) {
  ...
  print "OK\n";
}

Regards
Henrik

Received on Thu Sep 07 2006 - 05:53:28 MDT

This archive was generated by hypermail pre-2.1.9 : Sun Oct 01 2006 - 12:00:03 MDT