Forum OpenACS Development: Changed error messages to return http status 500 instead of 200

I changed in cvs the proc rp_report_error to return a http status code of 500 instead of the previous 200 in case of a request error and hope that was ok. I guess it was initially implemented this way to prevent IE from displaying 'friendly' error messages, but that's just not correct.

See https://openacs.org/bugtracker/openacs/bug?bug%5fnumber=799 for details.

On this bug, I would suggest something like:

<!--
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-->

that way, if someone ever uses gzip, the page will compress quite nicely.

It also might be nice to go ahead and pad it to 500 bytes regardless should the user shrink the error page to something smaller than is included by default.

practical - but so boring!

how about comments containing a portion of the gettysburg address?

or random pseudo-latin placeholder text: http://www.subterrane.com/loremipsum.shtml

or some cool ascii art? http://www.clasohm.com/cows/guide1.html

How about an excerpt from the GPL v2? This part seems appropriate for an error emssage! 😊

(Excerpt from the Gnu Public License, version 2):

                NO WARRANTY

  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.

  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.

Tillmann, just checking ... you're not returning 500 on input validation errors, security violation, etc., right?
Lars: no, the change to status code 500 only affects internal server errors.

Regarding blowing up the error message - what about inserting some lengthy rants about internet explorer and download links to alternatives? 😉

Seriously, I think we could blow it up conditionally, looking at the user-agent header, but I'll refrain from doing that since I don't have any IE installations available to test it.

<!--
OpenACS is an advanced Toolkit for creating scaleable, community-oriented web applications.  OpenACS contains a framework of applications including: User Management, Message Forum, News Module, Comments, Advertising Management, clickthrough counting, Event calender, E-Commerce module, Blog with RSS support, Photo Albums, Survey modules, a Press module to highlight mentions in the press and a search module to allow global site searching of the dynamic content created through the framework.

Visit https://openacs.org/ to learn how your site can take advantage of this powerful toolkit.
-->

It may not have wrapped well, but that is >500 characters and would at least prevent the smart error messages in IE.

and is probably a bit better than my 500 a suggestion.