On 04/05/2013 21:21, Mark Thomas wrote: > On 04/05/2013 20:43, Rossen Stoyanchev wrote: >> >> It appears that Tomcat ignores the Content-Type header when the >> status is set to 204 (No Content). > > Correct. It happens in AbstractHttp11Processor.prepareResponse() > >> I can see the rational for that, >> however is there a strong reason why Tomcat should care if it is set >> by the application? > > No. > > I took a look at RFC 2616. Section 10.2.5 states that a 204 response may > contain updated metainformation in the form of entity headers and, as > per section 7.1, Content-Type is an entity header so it should be not be > skipped if set for a 204 response. > > On those grounds, this is a Tomcat bug. > >> There are some corner cases [1]. > > That looks more like a bug in 3rd-party code. Bugs in 3rd party code are > rarely sufficient justification for changing Tomcat's behaviour. In this > case, the RFC2616 argument is a much stronger one and it looks to me > like the code will be changed (regardless of [1], not because of it).
Fixed in trunk and 7.0.x and will be in 7.0.40 onwards. Mark --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org