When I use the *http-error-handler* it works fine on Firefox displaying my message and doing some extra job. On IE it says "Can not display page" and shows the HTTP 500 code. I guess I need to filter out the http status code 500 and replace it for status ok somewhere. How can I replace the status code or fix the page in IE? BTW, when I use (redirect) inside of some of my handlers call I also get to the *http-error-handler*. I guess the proper thing to do is to add +http-moved-temporarily+ into the *approved-return-codes*.
Thank you, Andrew
On Tue, 10 Apr 2007 09:54:39 -0400, "Andrei Stebakov" lispercat@gmail.com wrote:
When I use the *http-error-handler* it works fine on Firefox displaying my message and doing some extra job. On IE it says "Can not display page" and shows the HTTP 500 code.
Yes, that seems to be a deliberate design decision of Microsoft.
I guess I need to filter out the http status code 500 and replace it for status ok somewhere. How can I replace the status code or fix the page in IE?
http://weitz.de/hunchentoot/#return-code
BTW, when I use (redirect) inside of some of my handlers call I also get to the *http-error-handler*. I guess the proper thing to do is to add +http-moved-temporarily+ into the *approved-return-codes*.
As long as you don't change the return code and the "Location" header it shouldn't matter.
(setf (return-code) +http-ok+) doesn't have any effect on IE 7.0 when I do it inside my *http-error-handler*. Is it possible to extract a *session* or *reply* from the user defined *http-error-handler*?
Andrew
On 4/10/07, Edi Weitz edi@agharta.de wrote:
On Tue, 10 Apr 2007 09:54:39 -0400, "Andrei Stebakov" lispercat@gmail.com wrote:
When I use the *http-error-handler* it works fine on Firefox displaying my message and doing some extra job. On IE it says "Can not display page" and shows the HTTP 500 code.
Yes, that seems to be a deliberate design decision of Microsoft.
I guess I need to filter out the http status code 500 and replace it for status ok somewhere. How can I replace the status code or fix the page in IE?
http://weitz.de/hunchentoot/#return-code
BTW, when I use (redirect) inside of some of my handlers call I also get
to
the *http-error-handler*. I guess the proper thing to do is to add +http-moved-temporarily+ into the *approved-return-codes*.
As long as you don't change the return code and the "Location" header it shouldn't matter. _______________________________________________ tbnl-devel site list tbnl-devel@common-lisp.net http://common-lisp.net/mailman/listinfo/tbnl-devel
On Tue, 10 Apr 2007 10:36:22 -0400, "Andrei Stebakov" lispercat@gmail.com wrote:
(setf (return-code) +http-ok+) doesn't have any effect on IE 7.0 when I do it inside my *http-error-handler*.
Yes, you're right, I confused myself. The code in headers.lisp already has the return code in a local variable and doesn't update it after the error handler returns. The original intent (code by Stefan Scholl IIRC) obviously was that it should work a bit like Apache's ErrorDocument directive. And I agree that it generally is a bad idea to change the return code in an error handler (see for example Apache documentation for "ErrorDocument").
Is it possible to extract a *session* or *reply* from the user defined *http-error-handler*?
Yes.
On Tue, 10 Apr 2007 09:54:39 -0400, "Andrei Stebakov" lispercat@gmail.com wrote:
When I use the *http-error-handler* it works fine on Firefox displaying my message and doing some extra job. On IE it says "Can not display page" and shows the HTTP 500 code. I guess I need to filter out the http status code 500 and replace it for status ok somewhere.
There's a better way to deal with this:
Microsoft Internet Explorer (MSIE) will by default ignore server-generated error messages when they are "too small" and substitute its own "friendly" error messages. The size threshold varies depending on the type of error, but in general, if you make your error document greater than 512 bytes, then MSIE will show the server-generated error rather than masking it.
http://support.microsoft.com/default.aspx?scid=kb;en-us;Q294807 http://httpd.apache.org/docs/2.2/mod/core.html#errordocument
On Tue, 2007-04-10 at 17:00 +0200, Edi Weitz wrote:
On Tue, 10 Apr 2007 09:54:39 -0400, "Andrei Stebakov" lispercat@gmail.com wrote:
When I use the *http-error-handler* it works fine on Firefox displaying my message and doing some extra job. On IE it says "Can not display page" and shows the HTTP 500 code. I guess I need to filter out the http status code 500 and replace it for status ok somewhere.
There's a better way to deal with this:
Microsoft Internet Explorer (MSIE) will by default ignore server-generated error messages when they are "too small" and substitute its own "friendly" error messages. The size threshold varies depending on the type of error, but in general, if you make your error document greater than 512 bytes, then MSIE will show the server-generated error rather than masking it.
http://support.microsoft.com/default.aspx?scid=kb;en-us;Q294807 http://httpd.apache.org/docs/2.2/mod/core.html#errordocument
Thank's Edi!
You saved my day - it's always healthy to have a good laugh :-) The sad thing: this is real ...
Cheers RalfD
tbnl-devel site list tbnl-devel@common-lisp.net http://common-lisp.net/mailman/listinfo/tbnl-devel