costin 02/02/06 21:05:54 Modified: src/share/org/apache/tomcat/modules/server Ajp13.java Log: Added the password decoding for ajp13. Revision Changes Path 1.32 +21 -2 jakarta-tomcat/src/share/org/apache/tomcat/modules/server/Ajp13.java Index: Ajp13.java =================================================================== RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/modules/server/Ajp13.java,v retrieving revision 1.31 retrieving revision 1.32 diff -u -r1.31 -r1.32 --- Ajp13.java 10 Oct 2001 01:52:44 -0000 1.31 +++ Ajp13.java 7 Feb 2002 05:05:54 -0000 1.32 @@ -146,6 +146,7 @@ public static final byte SC_A_SSL_CERT = 7; public static final byte SC_A_SSL_CIPHER = 8; public static final byte SC_A_SSL_SESSION = 9; + public static final byte SC_A_SECRET = 12; // Used for attributes which are not in the list above public static final byte SC_A_REQ_ATTRIBUTE = 10; @@ -218,7 +219,8 @@ int pos; // Current read position within that buffer boolean end_of_stream; // true if we've received an empty packet - + String secret=null; + // True to ignore HTTP server auth private boolean tomcatAuthentication=true; @@ -254,6 +256,10 @@ pos = 0; } + public String getSecret() { + return secret; + } + /** * Read a new packet from the web server and decode it. If it's a * forwarded request, store its properties in the passed-in Request @@ -292,6 +298,10 @@ return decodeRequest(req, hBuf); case JK_AJP13_SHUTDOWN: + if( hBuf.getLen() > 3 ) { + // we have a secret + secret=hBuf.getString(); + } return -2; } return 200; // XXX This is actually an error condition @@ -410,6 +420,12 @@ } break; + case SC_A_SECRET : + String s=msg.getString(); + if( s!=null ) + secret=s; + break; + case SC_A_SSL_CIPHER : isSSL = true; req.setAttribute("javax.servlet.request.cipher_suite", @@ -428,7 +444,10 @@ break; default: - return 500; // Error + // Ignore. Assume a single-string value - we shouldn't + // allow anything else. + msg.getString(); + break; } }
-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>