tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 21219] New: - Corrupted Message Body on interrupted GET
Date Tue, 01 Jul 2003 12:37:27 GMT
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: tomcat-dev@jakarta.apache.org
        ReportedBy: stefan.eissing@greenbytes.de


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: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Mime
View raw message