Geoffrey Talvola wrote:
> This checkin was made to Subversion back in January:
> r2022 | jdhildeb | 2005-01-11 18:33:13 -0500 (Tue, 11 Jan 2005) | 3 lines
> When a servlet exception occurs, set the HTTP status code to 500,
> "Servlet Error". Thanks to Radoslaw Kintzi.
> I recently noticed that Internet Explorer sometimes now displays a generic
> "The page cannot be displayed" error message instead of Webware's "The site
> is having technical difficulties with this page" message on servlet errors.
> I'm not sure why the behavior is not 100% reproducible or why it's
> IE-specific. If I comment out this line from ExceptionHandler.py:
> self._res.setStatus(500, "Servlet Error")
> then IE seems to always display Webware's message, as it should. It seems
> that sometimes, but not always, IE replaces the appserver-supplied error
> message with its own message when the status is 500.
This can also be resolved by artificially increasing the length of the
response body -- IE replaces the content when the content is under a
certain length (I can't remember the exactly number). A big comment
would do it, for instance.
> I would like to switch the code back to the way it used to be, unless
> there's some important reason to use status code 500 that I'm missing. Any
Well, there's lots of clients that pay attention to the status code
(moreso than browsers), and an exception report is quite different from
a valid response.
Ian Bicking / ianb@... / http://blog.ianbicking.org