httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John K. Sterling" <>
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.


>-- Original Message --
>Subject: RFC on cgi-error hook
>Date: Fri, 8 Nov 2002 12:51:55 -0600
>From: "Dietz, Phil E." <>
>To: <>
>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
>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
>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 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
>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.

View raw message