Alvaro Lopez Ortega wrote:
John Hampton wrote:

 > I noticed an ErrorHandler section in the default configuration, but I
 > couldn't find any other documentation on it.

  Yeah, we have to give some love to the wiki ':-)

Well, I'm happy to help, but with most things I'm not sure I know enough yet to be of much use.

  Have you tried something like this?

===
ErrorHandler error_redir {
    403 http://www.example.com/error403.html
}
===

No, and here's why: I don't think it will work. The reason being that the error page isn't a page that is located on disk. It's a dynamically generated page returned by Trac.

Apache:
https://pacopablo.com/projects/red_tape

Cherokee:
http://pacopablo.com:8080/projects/red_tape

The relevent code in Trac is found here:

http://projects.edgewall.com/trac/browser/tags/trac-0.9/trac/web/cgi_frontend.py#L130

Lines 130+, very bottom of file, and

http://projects.edgewall.com/trac/browser/tags/trac-0.9/trac/web/main.py#L199

Specifically lines 229-234

What happens is that Trac raises a PermissionError and it's caught by the try/excpet in cgi_frontend.py. It then calls send_pretty_error in main.py which returns a 403 error code but also returns a nicely formatted error page. The error page is shown in apache, but not in Cherokee.

-John
P.S. I LOVE Open Source software!
_______________________________________________
Cherokee mailing list
Cherokee@lists.alobbs.com
http://www.alobbs.com/cgi-bin/mailman/listinfo/cherokee

Reply via email to