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.

-Tim


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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to