tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1479179 - in /tomcat/trunk: java/org/apache/coyote/http11/AbstractHttp11Processor.java webapps/examples/WEB-INF/web.xml
Date Sat, 04 May 2013 21:20:28 GMT
Author: markt
Date: Sat May  4 21:20:27 2013
New Revision: 1479179

URL: http://svn.apache.org/r1479179
Log:
204 responses are permitted entity headers

Modified:
    tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java
    tomcat/trunk/webapps/examples/WEB-INF/web.xml

Modified: tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java?rev=1479179&r1=1479178&r2=1479179&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java (original)
+++ tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java Sat May  4 21:20:27
2013
@@ -24,6 +24,7 @@ import java.util.concurrent.atomic.Atomi
 import java.util.regex.Pattern;
 
 import javax.servlet.RequestDispatcher;
+import javax.servlet.http.HttpServletResponse;
 import javax.servlet.http.HttpUpgradeHandler;
 
 import org.apache.coyote.AbstractProcessor;
@@ -1362,7 +1363,8 @@ public abstract class AbstractHttp11Proc
         }
 
         MimeHeaders headers = response.getMimeHeaders();
-        if (!entityBody) {
+        // A SC_NO_CONTENT response may include entity headers
+        if (!entityBody && statusCode != HttpServletResponse.SC_NO_CONTENT) {
             response.setContentLength(-1);
         } else {
             String contentType = response.getContentType();

Modified: tomcat/trunk/webapps/examples/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/examples/WEB-INF/web.xml?rev=1479179&r1=1479178&r2=1479179&view=diff
==============================================================================
--- tomcat/trunk/webapps/examples/WEB-INF/web.xml (original)
+++ tomcat/trunk/webapps/examples/WEB-INF/web.xml Sat May  4 21:20:27 2013
@@ -27,6 +27,20 @@
     </description>
     <display-name>Servlet and JSP Examples</display-name>
 
+    <!--
+    If you are running the Autobahn WebSocket testsuite - or any other testsuite
+    that uses large messages - uncomment the following to improve performance
+    -->
+    <!--
+    <context-param>
+        <param-name>org.apache.tomcat.websocket.binaryBufferSize</param-name>
+        <param-value>2097152</param-value>
+    </context-param>
+    <context-param>
+        <param-name>org.apache.tomcat.websocket.textBufferSize</param-name>
+        <param-value>2097152</param-value>
+    </context-param>
+    -->
 
     <!-- Define example filters -->
     <filter>



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message