I do : wget -s and I see this :

--16:57:34--  http://dev.cerib.reflexe.fr/cerib_BDAdmin
           => `cerib_BDAdmin'
Connexion vers dev.cerib.reflexe.fr:80...Connect�!
requ�te HTTP transmise, en attente de la r�ponse...302 Found
Location: http://dev.cerib.reflexe.fr/cerib/cerib_BDAdmin [suivant]
--16:57:34--  http://dev.cerib.reflexe.fr/cerib/cerib_BDAdmin
           => `cerib_BDAdmin'
Connexion vers dev.cerib.reflexe.fr:80...Connect�!
requ�te HTTP transmise, en attente de la r�ponse...500 Internal Server Error
16:57:34 ERREUR 500: Internal Server Error.


----- Original Message -----
From: "mh" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, March 21, 2002 4:10 PM
Subject: Apache Tomcat response.setHeader("WWW-Authenticate","BASIC


I use Apache 1.3.19 & Tomcat 4.0.1 via mod_jk on Linux platform.

I try to do this in a servlet :

String authHeader = request.getHeader("Authorization");
if (authHeader != null) {
 AuthInternaute ai = new AuthInternaute(authHeader);
 String username = ai.getUsername();
 String password = ai.getPassword();
 allow = (validUsername.equals(username) && validPassword.equals(password));
}
else
{
 response.setHeader("WWW-Authenticate", "BASIC realm=\""+realm+"\"");
 response.sendError(response.SC_UNAUTHORIZED, "Identification required /
Autorisation n�cessaire.");
}

but Apache doesn't respond correctly and send an "Internal Server Error"
instead of authentication dialog box.

It works fine with tomcat standalone. Perhaps a mod_jk problem, I don't know
how to solve this problem.

Can someone have ideas ?

M.H.



--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>

Reply via email to