Return-Path: Delivered-To: apmail-httpd-dev-archive@www.apache.org Received: (qmail 68560 invoked from network); 29 Sep 2003 23:27:48 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 29 Sep 2003 23:27:48 -0000 Received: (qmail 82290 invoked by uid 500); 29 Sep 2003 23:27:30 -0000 Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 81875 invoked by uid 500); 29 Sep 2003 23:27:27 -0000 Mailing-List: contact dev-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list dev@httpd.apache.org Received: (qmail 81862 invoked from network); 29 Sep 2003 23:27:26 -0000 Received: from unknown (HELO ms-smtp-03.southeast.rr.com) (24.93.67.84) by daedalus.apache.org with SMTP; 29 Sep 2003 23:27:26 -0000 Received: from attglobal.net (rdu57-70-140.nc.rr.com [66.57.70.140]) by ms-smtp-03.southeast.rr.com (8.12.5/8.12.2) with ESMTP id h8TNPGaw026809 for ; Mon, 29 Sep 2003 19:25:16 -0400 (EDT) Message-ID: <3F78BFD5.4090002@attglobal.net> Date: Mon, 29 Sep 2003 19:27:17 -0400 From: Jeff Trawick Reply-To: trawick@attglobal.net User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624 X-Accept-Language: en-us, en MIME-Version: 1.0 To: dev@httpd.apache.org Subject: how to log what status was returned by a cgi script Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N 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)