[squid-users] authentication problem and "Server redirected too many times (20)" error message

From: Rami Jaamour <rjaamour@dont-contact.us>
Date: Mon, 01 Dec 2003 17:42:54 -0800

Hello,

My Squid works fine without authentication but when I try to use
ncsa_auth I get problems.

When attempting to make a HTTP connection from a Java app, I get:
java.net.ProtocolException: Server redirected too many times (20)
     at
sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:800)

When I use mozilla with the proxy settings configured to my squid, it
keeps infinitely prompting for the username and password even though I
give it the correct username and password.

Here is the diff -w of my squid.conf against squid.conf.default:

1007a1008
> redirect_program /usr/local/squid/libexec/redirector.pl
1073c1074,1076
< # auth_param basic program /usr/local/squid/bin/ncsa_auth
/usr/local/squid/etc/passwd

---
  > auth_param basic program /usr/local/squid/bin/ncsa_auth
/usr/local/squid/etc/users
  >
1726a1730,1732
  > acl authenticated_user proxy_auth REQUIRED
  >
1765a1772,1773
  > http_access allow authenticated_user
1986a1995,1996
  > cache_effective_user rjaamour
  > cache_effective_group root
The "users" password file was created using httpass -c users <username>
and it works fine when I validate it using
ncsa_auth users
meaning, only when I type the correct username and password pair it
returns "OK" and it returns "ERR" otherwise.
My redirector.pl is just
#!/usr/bin/perl
$|=1;
while (<>) {
     s@http://rami@http://fox@;
     s@http://jeehong@http://trout@;
     print;
}
Which appears to work fine when I run it alone.
I'm using Squid 2.5.STABLE-4 on Mandrake 9.2 (kernel 2.4.22), apache 2.0.48. Help!
Sincerely,
-- 
Rami Jaamour
SOAPtest <http://www.parasoft.com/jsp/products/home.jsp?product=SOAP>
Development
ParaSoft Corporation <http://www.parasoft.com>
Received on Mon Dec 01 2003 - 18:45:08 MST

This archive was generated by hypermail pre-2.1.9 : Thu Jan 01 2004 - 12:00:03 MST