remm 2005/07/26 09:13:33 Modified: jk/java/org/apache/coyote/ajp AjpAprProcessor.java AjpAprProtocol.java webapps/docs changelog.xml Log: - Add tomcatAuthentication to the protocol handler, so that it can actually be configured. - Remove all other useless attributes (which came along from the HTTP cut & paste). Revision Changes Path 1.10 +7 -53 jakarta-tomcat-connectors/jk/java/org/apache/coyote/ajp/AjpAprProcessor.java Index: AjpAprProcessor.java =================================================================== RCS file: /home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/coyote/ajp/AjpAprProcessor.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- AjpAprProcessor.java 23 Jun 2005 17:22:13 -0000 1.9 +++ AjpAprProcessor.java 26 Jul 2005 16:13:33 -0000 1.10 @@ -79,7 +79,7 @@ // ----------------------------------------------------------- Constructors - public AjpAprProcessor(int headerBufferSize, AprEndpoint endpoint) { + public AjpAprProcessor(AprEndpoint endpoint) { this.endpoint = endpoint; @@ -180,12 +180,6 @@ /** - * Use Tomcat authentication ? - */ - protected boolean tomcatAuthentication = true; - - - /** * Socket associated with the current connection. */ protected long socket; @@ -228,12 +222,6 @@ /** - * Max post size. - */ - protected int maxPostSize = 2 * 1024 * 1024; - - - /** * Host name (used to avoid useless B2C conversion on the host name). */ protected char[] hostNameC = new char[0]; @@ -246,12 +234,6 @@ /** - * Allow a customized the server header for the tin-foil hat folks. - */ - protected String server = null; - - - /** * The socket timeout used when reading the first block of the request * header. */ @@ -371,43 +353,15 @@ // ------------------------------------------------------------- Properties - // --------------------------------------------------------- Public Methods - - - /** - * Set the maximum size of a POST which will be buffered in SSL mode. - */ - public void setMaxPostSize(int mps) { - maxPostSize = mps; - } - - - /** - * Return the maximum size of a POST which will be buffered in SSL mode. - */ - public int getMaxPostSize() { - return maxPostSize; - } - - /** - * Set the server header name. + * Use Tomcat authentication ? */ - public void setServer( String server ) { - if (server==null || server.equals("")) { - this.server = null; - } else { - this.server = server; - } - } - + protected boolean tomcatAuthentication = true; + public boolean getTomcatAuthentication() { return tomcatAuthentication; } + public void setTomcatAuthentication(boolean tomcatAuthentication) { this.tomcatAuthentication = tomcatAuthentication; } - /** - * Get the server header name. - */ - public String getServer() { - return server; - } + + // --------------------------------------------------------- Public Methods /** Get the request associated with this processor. 1.6 +9 -215 jakarta-tomcat-connectors/jk/java/org/apache/coyote/ajp/AjpAprProtocol.java Index: AjpAprProtocol.java =================================================================== RCS file: /home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/coyote/ajp/AjpAprProtocol.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- AjpAprProtocol.java 27 Jun 2005 13:44:04 -0000 1.5 +++ AjpAprProtocol.java 26 Jul 2005 16:13:33 -0000 1.6 @@ -33,7 +33,6 @@ import org.apache.coyote.RequestGroupInfo; import org.apache.coyote.RequestInfo; import org.apache.tomcat.util.net.AprEndpoint; -import org.apache.tomcat.util.net.ServerSocketFactory; import org.apache.tomcat.util.net.AprEndpoint.Handler; import org.apache.tomcat.util.res.StringManager; @@ -195,26 +194,11 @@ protected Hashtable attributes = new Hashtable(); private int timeout = 300000; // 5 minutes as in Apache HTTPD server - private int maxPostSize = 2 * 1024 * 1024; - private int maxHttpHeaderSize = 4 * 1024; - private String reportedname; - private int socketCloseDelay=-1; - private boolean disableUploadTimeout = true; - private int socketBuffer = 9000; + protected boolean tomcatAuthentication = true; + private Adapter adapter; private AjpConnectionHandler cHandler; - /** - * Compression value. - */ - private String compression = "off"; - private String noCompressionUserAgents = null; - private String restrictedUserAgents = null; - private String compressableMimeTypes = "text/html,text/xml,text/plain"; - private int compressionMinSize = 2048; - - private String server; - // -------------------- Pool setup -------------------- public int getMaxThreads() { @@ -260,7 +244,7 @@ } public void setUseSendfile(boolean useSendfile) { - ep.setUseSendfile(useSendfile); + // No sendfile for AJP } public InetAddress getAddress() { @@ -292,20 +276,12 @@ setAttribute("tcpNoDelay", "" + b); } - public boolean getDisableUploadTimeout() { - return disableUploadTimeout; - } - - public void setDisableUploadTimeout(boolean isDisabled) { - disableUploadTimeout = isDisabled; - } - - public int getSocketBuffer() { - return socketBuffer; + public boolean getTomcatAuthentication() { + return tomcatAuthentication; } - public void setSocketBuffer(int valueI) { - socketBuffer = valueI; + public void setTomcatAuthentication(boolean tomcatAuthentication) { + this.tomcatAuthentication = tomcatAuthentication; } public int getFirstReadTimeout() { @@ -335,60 +311,6 @@ return ep.getPollerSize(); } - public int getMaxPostSize() { - return maxPostSize; - } - - public void setMaxPostSize(int valueI) { - maxPostSize = valueI; - setAttribute("maxPostSize", "" + valueI); - } - - public int getMaxHttpHeaderSize() { - return maxHttpHeaderSize; - } - - public void setMaxHttpHeaderSize(int valueI) { - maxHttpHeaderSize = valueI; - setAttribute("maxHttpHeaderSize", "" + valueI); - } - - public String getRestrictedUserAgents() { - return restrictedUserAgents; - } - - public void setRestrictedUserAgents(String valueS) { - restrictedUserAgents = valueS; - setAttribute("restrictedUserAgents", valueS); - } - - public String getNoCompressionUserAgents() { - return noCompressionUserAgents; - } - - public void setNoCompressionUserAgents(String valueS) { - noCompressionUserAgents = valueS; - setAttribute("noCompressionUserAgents", valueS); - } - - public String getCompressableMimeType() { - return compressableMimeTypes; - } - - public void setCompressableMimeType(String valueS) { - compressableMimeTypes = valueS; - setAttribute("compressableMimeTypes", valueS); - } - - public int getCompressionMinSize() { - return compressionMinSize; - } - - public void setCompressionMinSize(int valueI) { - compressionMinSize = valueI; - setAttribute("compressionMinSize", "" + valueI); - } - public int getSoLinger() { return ep.getSoLinger(); } @@ -407,125 +329,6 @@ setAttribute("soTimeout", "" + i); } - /* - public int getServerSoTimeout() { - return ep.getServerSoTimeout(); - } - - public void setServerSoTimeout( int i ) { - ep.setServerSoTimeout(i); - setAttribute("serverSoTimeout", "" + i); - } - */ - - public String getKeystore() { - return getProperty("keystore"); - } - - public void setKeystore( String k ) { - setAttribute("keystore", k); - } - - public String getKeypass() { - return getProperty("keypass"); - } - - public void setKeypass( String k ) { - attributes.put("keypass", k); - //setAttribute("keypass", k); - } - - public String getKeytype() { - return getProperty("keystoreType"); - } - - public void setKeytype( String k ) { - setAttribute("keystoreType", k); - } - - public String getClientauth() { - return getProperty("clientauth"); - } - - public void setClientauth( String k ) { - setAttribute("clientauth", k); - } - - public String getProtocol() { - return getProperty("protocol"); - } - - public void setProtocol( String k ) { - setSecure(true); - setAttribute("protocol", k); - } - - public String getProtocols() { - return getProperty("protocols"); - } - - public void setProtocols(String k) { - setAttribute("protocols", k); - } - - public String getAlgorithm() { - return getProperty("algorithm"); - } - - public void setAlgorithm( String k ) { - setAttribute("algorithm", k); - } - - public boolean getSecure() { - return secure; - } - - public void setSecure( boolean b ) { - secure=b; - setAttribute("secure", "" + b); - } - - public String getCiphers() { - return getProperty("ciphers"); - } - - public void setCiphers(String ciphers) { - setAttribute("ciphers", ciphers); - } - - public String getKeyAlias() { - return getProperty("keyAlias"); - } - - public void setKeyAlias(String keyAlias) { - setAttribute("keyAlias", keyAlias); - } - - public int getSocketCloseDelay() { - return socketCloseDelay; - } - - public void setSocketCloseDelay( int d ) { - socketCloseDelay=d; - setAttribute("socketCloseDelay", "" + d); - } - - public void setServer( String server ) { - this.server = server; - } - - public String getServer() { - return server; - } - - - private static ServerSocketFactory string2SocketFactory( String val) - throws ClassNotFoundException, IllegalAccessException, - InstantiationException { - Class chC=Class.forName( val ); - return (ServerSocketFactory)chC.newInstance(); - } - public int getTimeout() { return timeout; } @@ -535,14 +338,6 @@ setAttribute("timeout", "" + timeouts); } - public String getReportedname() { - return reportedname; - } - - public void setReportedname( String reportedName) { - reportedname = reportedName; - } - // -------------------- Connection handler -------------------- static class AjpConnectionHandler implements Handler { @@ -560,10 +355,9 @@ try { processor = (AjpAprProcessor) localProcessor.get(); if (processor == null) { - processor = new AjpAprProcessor(proto.maxHttpHeaderSize, proto.ep); + processor = new AjpAprProcessor(proto.ep); processor.setAdapter(proto.adapter); - processor.setMaxPostSize(proto.maxPostSize); - processor.setServer(proto.server); + processor.setTomcatAuthentication(proto.tomcatAuthentication); localProcessor.set(processor); if (proto.getDomain() != null) { synchronized (this) { 1.339 +3 -0 jakarta-tomcat-catalina/webapps/docs/changelog.xml Index: changelog.xml =================================================================== RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/docs/changelog.xml,v retrieving revision 1.338 retrieving revision 1.339 diff -u -r1.338 -r1.339 --- changelog.xml 26 Jul 2005 12:45:22 -0000 1.338 +++ changelog.xml 26 Jul 2005 16:13:33 -0000 1.339 @@ -52,6 +52,9 @@ hostname does not specify the port, and which were inverted (https was set as 80 and http as 443). (remm) </fix> + <fix> + Add missing tomcatAuthentication attribute to the AJP APR implementation. (remm) + </fix> </changelog> </subsection>
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]