You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2004/06/28 17:43:18 UTC
DO NOT REPLY [Bug 29846] New: -
Handling of error reports
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=29846>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=29846
Handling of error reports
Summary: Handling of error reports
Product: Tomcat 5
Version: 5.0.25
Platform: All
OS/Version: All
Status: NEW
Severity: Major
Priority: Other
Component: Catalina
AssignedTo: tomcat-dev@jakarta.apache.org
ReportedBy: jens.mueller@dbv-winterthur.de
There seems to be a bug with the handling of error reports.
If you set the content-length in a response ( ServletResponse.setContentLength
() ) to 0 or any other value greater than 0 and also set a status-code
(HttpServletResponse.setStatus() ) to a value greater than 400 (401 is a very
good example), tomcat will send a wrong http-response to the client!
The client receives the header 'content-length' with the value 0 and stops
reading from the stream. But the is also a html-message in the stream, wich was
generated by tomcat ( org.apache.catalina.valves.ErrorReportValve.report() ).
If you are running persistent connections (keep-alive), with the next response
the client receives first the html-message and than the status line and the
http-headers. So the html-message is in the wrong response on the wrong
position.
It don't strikes, if you are not running persistens connections, because the
stream will be closed and a new one will be opened for the next request.
===
And there seems to be a second bug with the handling of error reports.
If you set a status-code, wich is not listed in
org.apache.catalina.valves.LocalStrings.properties (999 for example), the html-
message looks like this:
HTTP Status 999 - Cannot find message associated with key '999'.
( org.apache.catalina.util.StringManager.getStringInternal() - in the catch-
block null could be a better return value )
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org