httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Trawick <>
Subject how to log what status was returned by a cgi script
Date Mon, 29 Sep 2003 23:27:17 GMT
a cgi script can write this in the response header: "Status: nnn"...  it 
would sometimes be nice to know if the script did such a thing...

(like a current problem I'm working on: where the heck did the 500 come 
from for this CGI; there's nothing in the error log and the few places 
in the server that return 500 without logging don't seem like good 
suspects; being able to clearly log any status set by the script would 
eliminate any rude finger pointing)

how about in ap_scan_script_header_err_core() we set an envvar 
(script-status) to the value of the Status field, if provided?
then in a custom log format the script-status envvar can be logged...

or am I missing a way to log this info already?  (not the ScriptLog 
stuff; this is for a production environment :) )

alternatively, ap_scan_script_header_err_core() could stick something in 
the error log for bad http status codes, but that isn't quite as 
applicable (though it is automatic)

View raw message