Author: markt Date: Wed Dec 14 11:04:34 2016 New Revision: 1774172 URL: http://svn.apache.org/viewvc?rev=1774172&view=rev Log: Don't duplicate storage of maxSavePostSize in the Processor
Modified: tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Protocol.java tomcat/trunk/java/org/apache/coyote/http11/Http11Processor.java Modified: tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Protocol.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Protocol.java?rev=1774172&r1=1774171&r2=1774172&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Protocol.java (original) +++ tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Protocol.java Wed Dec 14 11:04:34 2016 @@ -90,12 +90,23 @@ public abstract class AbstractHttp11Prot // ------------------------------------------------ HTTP specific properties // ------------------------------------------ managed in the ProtocolHandler + private int maxSavePostSize = 4 * 1024; /** - * Maximum size of the post which will be saved when processing certain - * requests, such as a POST. + * Return the maximum size of the post which will be saved during FORM or + * CLIENT-CERT authentication. + * + * @return The size in bytes */ - private int maxSavePostSize = 4 * 1024; public int getMaxSavePostSize() { return maxSavePostSize; } + /** + * Set the maximum size of a POST which will be buffered during FORM or + * CLIENT-CERT authentication. When a POST is received where the security + * constraints require a client certificate, the POST body needs to be + * buffered while an SSL handshake takes place to obtain the certificate. A + * similar buffering is required during FDORM auth. + * + * @param msps The maximum size POST body to buffer in bytes + */ public void setMaxSavePostSize(int valueI) { maxSavePostSize = valueI; } @@ -694,7 +705,6 @@ public abstract class AbstractHttp11Prot processor.setCompression(getCompression()); processor.setNoCompressionUserAgents(getNoCompressionUserAgents()); processor.setCompressableMimeTypes(getCompressableMimeTypes()); - processor.setMaxSavePostSize(getMaxSavePostSize()); processor.setServer(getServer()); processor.setServerRemoveAppProvidedValues(getServerRemoveAppProvidedValues()); return processor; Modified: tomcat/trunk/java/org/apache/coyote/http11/Http11Processor.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/Http11Processor.java?rev=1774172&r1=1774171&r2=1774172&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/coyote/http11/Http11Processor.java (original) +++ tomcat/trunk/java/org/apache/coyote/http11/Http11Processor.java Wed Dec 14 11:04:34 2016 @@ -141,12 +141,6 @@ public class Http11Processor extends Abs /** - * Max saved post size. - */ - protected int maxSavePostSize = 4 * 1024; - - - /** * Regular expression that defines the user agents to not use gzip with */ protected Pattern noCompressionUserAgents = null; @@ -334,29 +328,6 @@ public class Http11Processor extends Abs /** - * Set the maximum size of a POST which will be buffered in SSL mode. - * When a POST is received where the security constraints require a client - * certificate, the POST body needs to be buffered while an SSL handshake - * takes place to obtain the certificate. - * - * @param msps The maximum size POST body to buffer in bytes - */ - public void setMaxSavePostSize(int msps) { - maxSavePostSize = msps; - } - - - /** - * Return the maximum size of a POST which will be buffered in SSL mode. - * - * @return The size in bytes - */ - public int getMaxSavePostSize() { - return maxSavePostSize; - } - - - /** * Set the server header name. * * @param server The new value to use for the server header @@ -1419,7 +1390,7 @@ public class Http11Processor extends Abs // interfere with the client's handshake messages InputFilter[] inputFilters = inputBuffer.getFilters(); ((BufferedInputFilter) inputFilters[Constants.BUFFERED_FILTER]).setLimit( - maxSavePostSize); + protocol.getMaxSavePostSize()); inputBuffer.addActiveFilter(inputFilters[Constants.BUFFERED_FILTER]); try { --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org