Hi!
It seems that setting "Content-Length" header on response commits that
response (which shouldn't happen).
protected void doGet(HttpServletRequest request,
HttpServletResponse response) throws ServletException, IOException {
httpServletResponse.setIntHeader("Content-Length", 0);
httpServletResponse.sendError(404);
}
After invoking such a servlet I'm getting IllegalStateException
java.lang.IllegalStateException
org.apache.coyote.tomcat5.CoyoteResponseFacade.sendError(CoyoteResponseFacade.java:338)
com.fcs.TestServlet.doGet(TestServlet.java:32)
I tried the following combination
httpServletResponse.setIntHeader("Content-Length", 0);
httpServletResponse.setStatus(304);
Using sniffer I see that there is no 304 response, but 200 Ok.
Can somebody clarify this?
Regards,
Viktor
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]