Nancy Lin <[EMAIL PROTECTED]> wrote:
>
>Hi
>
>In the mod_perl eagle book, there's a section on writing customer error
>handler (pg 173-174). The example has two scripts. The first one
>GoFish.pm, basically returns a 500 status code and names Carp.pm as the
>custom error handler.
>
>I notice that if I take out the line:
> $r-custom_response(SERVER_ERROR, "/Carp");
>and put in httpd.conf
> ErrorDocument 500 /Carp
>
>it'll work too (verified by telnet'ing to port). However, the access_log
>file will log a 500 status for the original code and a 200 status for the
>other. Why is that?
The log appears to log the status code of the actual response made to the
browser. If the response is done via the ErrorDocument, the server is only
serving an alternate document, which usually succeeds. The custom_response
would not alter the already set status code for the request. This is only
speculation on my part based on what I have seen on my own servers.
--
James Smith <[EMAIL PROTECTED]>, 979-862-3725
Texas A&M CIS Operating Systems Group, Unix