tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Funk <>
Subject Re: Tomcat 5 Issue (not 5.0.16 specific!)
Date Tue, 02 Dec 2003 15:53:42 GMT
Section 5.5 of the spec:
When a response is closed, the container must immediately flush all remaining 
content in the response buffer to the client. The following events indicate 
that the servlet has satisfied the request and that the response object is to 
be closed:
• The termination of the service method of the servlet.
* • The amount of content specified in the setContentLength method of the 
response has been written to the response. *
• The sendError method is called.
• The sendRedirect method is called.

Looks like the behavior is OK.


Jess Holle wrote:

> First, I'd like to say that we should *not* consider the following issue 
> as one to prevent a "stable" label for Tomcat 5.0.16.
> That said, I've noted that if you do:
>    response.setContentLength( 0 );
> All subsequent setHeader(), etc, calls are ignored -- Tomcat considers 
> the response commited.
> Is this as per the spec?  Or is this an odd corner case?
> [The fact that we have code that does a setContentLength(0) seems to be 
> an odd corner case in and of itself...  I've worked around this in our 
> code by ensuring that this call is always made after all other headers 
> are assigned.]
> -- 
> Jess Holle

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message