httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John K. Sterling" <j...@sterls.com>
Subject RE: RFC on cgi-error hook
Date Fri, 08 Nov 2002 18:58:38 GMT
you would not want to modify the core for this.  You would want to use optional
functions and add an optional function to mod_cgi to register for it.  Then
have mod_cgi notify all registered methods of any stderr data.

sterling

>-- Original Message --
>Reply-To: dev@httpd.apache.org
>Subject: RFC on cgi-error hook
>Date: Fri, 8 Nov 2002 12:51:55 -0600
>From: "Dietz, Phil E." <PEDietz@West.com>
>To: <dev@httpd.apache.org>
>
>
>I want to add a new hook to apache2.
>
>It's called the "cgi-stderr" hook.
>
>If a CGI script emits anything on stderr, trap it into a bucket and let
all
>modules who want to look at the stderr bucket, do so.
>
>This can be used to:
>	escalate scripting errors, 
>	throttle apache to the problematic site, 
>	show special error documents, 
>	integrate cgi development into IDEs, 
>	etc.
>
>It would also let 3rd party vendors catch apache cgi-errors into their
tool...such
>as a mod_unicenter.c, etc.
>
>(imagine that your database goes down, so the CGI sends a special message
>back on stderr.  Apaches mod_throttle module sees that message and throttles
>access to the site).
>
>Now my question...
>
>Using mod_cgi is optional...so would it make sense to add a "cgi-stderr"
>hook to the server/core.c ?
>I'd like to use the hook mechanism so any 3rd party module could react
upon
>it.
>
>I guess this "cgi-stderr" hook could also be called a "stderr_filter" to
>go with the input_filter and output_filter hooks already available.
>
>Phil
>



Mime
View raw message