Terra Info wrote:
I have a script that provides custom error messages that I set up using the ErrorDocument directive (ie; ErrorDocument 400 /cgi-global/error.pl?error=400&useXML=1). When run under typical mod_cgi all works as planned and it outputs the proper stuff. When run under mod_perl it outputs the same but then appends the default ErrorDocument (ie; ErrorDocument 500 /error/HTTP_INTERNAL_SERVER_ERROR.html.var) output on the end so I have effectively two HTML docs on the output page.

The odd part of this issue is this. When it is a 404 error The stock error doc says that "Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request" which makes no sense since the only log entry is "File does not exist: /var/www/terradev/docs/bad-link". When you use the 500.pl example below you get "Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request." despite the fact that the custom error script did work and output what it was supposed to and the error logs confirm that.
Looks like ModPerl::Registry is not handling correctly the return status , hence you get the run of the default handler as well. I'll look into it. But first, does it work properly with mod_perl 1.0?

Finally please attach the script that fails, preferrably removing all but the very minimal code that allows to reproduce the problem. Thanks.

And if you can a test to modperl-2.0/ModPerl-Registry/t that reproduces the problem, that would be even better. If you don't know Apache::Test, you can learn more about it at:
http://perl.apache.org/docs/general/testing/testing.html
and looking at the existing tests. To run the registry tests you need to cd to the ModPerl-Registry dir first and run 'make test'. If it seems like too much work, I'll take care of adding the test. But it'd be cool if people who encounter problems were able to submit tests with their reports.

Thanks.


__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com



Reply via email to