Author: remy.maucherat(a)jboss.com
Date: 2008-04-01 09:08:39 -0400 (Tue, 01 Apr 2008)
New Revision: 576
Modified:
trunk/java/org/apache/coyote/http11/Http11AprProcessor.java
trunk/java/org/apache/coyote/http11/Http11Processor.java
trunk/webapps/docs/changelog.xml
trunk/webapps/docs/config/http.xml
Log:
- maxSavePostSize == 0 should disable buffering for SSL handshake.
Modified: trunk/java/org/apache/coyote/http11/Http11AprProcessor.java
===================================================================
--- trunk/java/org/apache/coyote/http11/Http11AprProcessor.java 2008-04-01 12:22:38 UTC
(rev 575)
+++ trunk/java/org/apache/coyote/http11/Http11AprProcessor.java 2008-04-01 13:08:39 UTC
(rev 576)
@@ -1226,7 +1226,7 @@
if (ssl && (socket != 0)) {
// Consume and buffer the request body, so that it does not
// interfere with the client's handshake messages
- if (maxSavePostSize > -2) {
+ if (maxSavePostSize != 0) {
InputFilter[] inputFilters = inputBuffer.getFilters();
((BufferedInputFilter)
inputFilters[Constants.BUFFERED_FILTER]).setLimit(maxSavePostSize);
inputBuffer.addActiveFilter(inputFilters[Constants.BUFFERED_FILTER]);
Modified: trunk/java/org/apache/coyote/http11/Http11Processor.java
===================================================================
--- trunk/java/org/apache/coyote/http11/Http11Processor.java 2008-04-01 12:22:38 UTC (rev
575)
+++ trunk/java/org/apache/coyote/http11/Http11Processor.java 2008-04-01 13:08:39 UTC (rev
576)
@@ -1081,15 +1081,13 @@
} else if (actionCode == ActionCode.ACTION_REQ_SSL_CERTIFICATE) {
if( sslSupport != null) {
- /*
- * Consume and buffer the request body, so that it does not
- * interfere with the client's handshake messages
- */
- InputFilter[] inputFilters = inputBuffer.getFilters();
- ((BufferedInputFilter) inputFilters[Constants.BUFFERED_FILTER])
- .setLimit(maxSavePostSize);
- inputBuffer.addActiveFilter
- (inputFilters[Constants.BUFFERED_FILTER]);
+ // Consume and buffer the request body, so that it does not
+ // interfere with the client's handshake messages
+ if (maxSavePostSize != 0) {
+ InputFilter[] inputFilters = inputBuffer.getFilters();
+ ((BufferedInputFilter)
inputFilters[Constants.BUFFERED_FILTER]).setLimit(maxSavePostSize);
+
inputBuffer.addActiveFilter(inputFilters[Constants.BUFFERED_FILTER]);
+ }
try {
Object sslO = sslSupport.getPeerCertificateChain(true);
if( sslO != null) {
Modified: trunk/webapps/docs/changelog.xml
===================================================================
--- trunk/webapps/docs/changelog.xml 2008-04-01 12:22:38 UTC (rev 575)
+++ trunk/webapps/docs/changelog.xml 2008-04-01 13:08:39 UTC (rev 576)
@@ -93,6 +93,10 @@
Repackage MimeHeaders and Parameters using inner classes, and remove all
obsolete
collections. (remm)
</update>
+ <fix>
+ maxSavePostSize set to 0 for HTTP connectors should disable buffering done before
SSL
+ handshake. (remm)
+ </fix>
</changelog>
</subsection>
</section>
Modified: trunk/webapps/docs/config/http.xml
===================================================================
--- trunk/webapps/docs/config/http.xml 2008-04-01 12:22:38 UTC (rev 575)
+++ trunk/webapps/docs/config/http.xml 2008-04-01 13:08:39 UTC (rev 576)
@@ -81,20 +81,14 @@
the container during FORM or CLIENT-CERT authentication. For both types
of authentication, the POST will be saved/buffered before the user is
authenticated. For CLIENT-CERT authentication, the POST is buffered for
- the duration of
- the SSL handshake and the buffer emptied when the request
- is processed. For FORM authentication the POST is
- saved whilst the user
+ the duration of the SSL handshake and the buffer emptied when the request
+ is processed. For FORM authentication the POST is saved whilst the user
is re-directed to the login form and is retained until the user
successfully authenticates or the session associated with the
authentication request expires. The limit can be disabled by setting this
- attribute to -1. Setting the attribute to
- zero will disable the saving of
- POST data during authentication
-. If not
- specified, this attribute is set
- to
- 4096 (4 kilobytes).</p>
+ attribute to -1. Setting the attribute to zero will disable the saving of
+ POST data during authentication and the buffering during SSL handshake.
+ If not specified, this attribute is set to 4096 (4 kilobytes).</p>
</attribute>
<attribute name="protocol" required="false">