According to the apache documentation, the custom log directive %s logs
the status of the original request.  Isn't that 500 in this case?  It says
500 when I telnet to the server.

I don't quite understand your explanation.  Can you give more details? 
 When I have a regular ErrorDocument directive that points to a simple cgi
script or a static html page, it logs the correct status code also.  Are
you saying in this case the actual response is a 200?  If it is, how/where
did that get set ?

Nancy

On Wed, 17 May 2000, James G Smith wrote:

> 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.
> 

Reply via email to