tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Konstantin Kolinko <knst.koli...@gmail.com>
Subject Re: svn commit: r1479189 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/coyote/http11/AbstractHttp11Processor.java webapps/docs/changelog.xml
Date Sun, 05 May 2013 01:02:56 GMT
2013/5/5  <markt@apache.org>:
> Author: markt
> Date: Sat May  4 21:49:16 2013
> New Revision: 1479189
>
> URL: http://svn.apache.org/r1479189
> Log:
> 204 responses are permitted entity headers
>
> Modified:
>     tomcat/tc7.0.x/trunk/   (props changed)
>     tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java
>     tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
>
> Propchange: tomcat/tc7.0.x/trunk/
> ------------------------------------------------------------------------------
>   Merged /tomcat/trunk:r1479179
>
> Modified: tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java
> URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java?rev=1479189&r1=1479188&r2=1479189&view=diff
> ==============================================================================
> --- tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java (original)
> +++ tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java Sat
May  4 21:49:16 2013
> @@ -1378,7 +1378,8 @@ public abstract class AbstractHttp11Proc
>          }
>
>          MimeHeaders headers = response.getMimeHeaders();
> -        if (!entityBody) {
> +        // A SC_NO_CONTENT (204) response may include entity headers
> +        if (!entityBody && statusCode != 204) {
>              response.setContentLength(-1);
>          } else {
>              String contentType = response.getContentType();
>

The talk in "Status 204" thread on users@ [1] was about Content-Type header,
but this change affects Content-Length one as well.

Why are you skipping "setContentLength(-1)" call?

[1] http://tomcat.markmail.org/thread/pah7hg7xv2wqvqs3


> Modified: tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
> URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml?rev=1479189&r1=1479188&r2=1479189&view=diff
> ==============================================================================
> --- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original)
> +++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Sat May  4 21:49:16 2013
> @@ -90,6 +90,10 @@
>          exception does not cause remaining checks to be skipped. Based on a
>          patch by NateC.
>        </fix>
> +      <fix>
> +        Allow 204 responses (no content) to include entity headers as required
> +        by RFC2616. (markt)
> +      </fix>
>      </changelog>
>    </subsection>


Best regards,
Konstantin Kolinko

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


Mime
View raw message