DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21219>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21219

Corrupted Message Body on interrupted GET

           Summary: Corrupted Message Body on interrupted GET
           Product: Tomcat 4
           Version: 4.1.18
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Critical
          Priority: Other
         Component: Connector:Coyote HTTP/1.1
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


The servlet container tries to send a 500 Repsonse on Servlet/RuntimeExceptions
even though the response is already committed. This leads to currupted
message content, sometimes even without the client being able to notice
that something went wrong. 
Example: servlet dies with a RuntimeException while copying content to
the response.getOutputStream(). Only 1000 bytes are missing from the
ContentLength as specified in the response header. Then tomcat sends the
500 response on the same connection which is just long enough so that
the client is able to read the last 1000 bytes of the response. The
client will not notice that the response body is corrupted.

Solution: do not generate the 500 response when the original response is
already committed. Instead close the HTTP connection immediately so that
the client will know that the response is incomplete. Without closing
the HTTP connection, the client will hang trying to read the rest of the
response which will never come.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to