On May 4, 2013, at 4:20 PM, ma...@apache.org wrote: > 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> >
Seems to me like maybe a bug should be created making the points outlined in the mailing list discussion so that there's a point of reference for why this change was made. I assume, also, that this will get ported to Tomcat 7 branch and suggested for Tomcat 6? Nick
smime.p7s
Description: S/MIME cryptographic signature