nacho 01/09/07 17:41:29 Modified: src/share/org/apache/tomcat/modules/server Ajp12.java Log: fix for 2629 ( userPrincipal not set when used with Ajp13 ). This bug was suffered by ajp12 connector too.. Revision Changes Path 1.21 +7 -2 jakarta-tomcat/src/share/org/apache/tomcat/modules/server/Ajp12.java Index: Ajp12.java =================================================================== RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/modules/server/Ajp12.java,v retrieving revision 1.20 retrieving revision 1.21 diff -u -r1.20 -r1.21 --- Ajp12.java 2001/08/25 14:19:49 1.20 +++ Ajp12.java 2001/09/08 00:41:29 1.21 @@ -70,6 +70,7 @@ import org.apache.tomcat.core.*; import org.apache.tomcat.util.net.*; import org.apache.tomcat.util.*; +import org.apache.tomcat.util.aaa.SimplePrincipal; class Ajp12 { Socket socket; @@ -153,12 +154,16 @@ req.remoteHost().setString( readString(ajpin, "")); if (isTomcatAuthentication()) dummy=readString(ajpin, null); - else req.setRemoteUser( readString(ajpin, null)); + else { + req.setRemoteUser( readString(ajpin, null)); + // Note that roles are not integrated with apache + req.setUserPrincipal( new SimplePrincipal( req.getRemoteUser() )); + } req.setAuthType(readString(ajpin, null)); //remote port dummy = readString(ajpin, null); // System.out.println("XXX rport " + dummy ); - + req.method().setString( readString(ajpin, null)); req.requestURI().setString( readString(ajpin, ""));