httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Lewis <>
Subject Re: Kill a request nicely
Date Wed, 15 Jun 2011 19:46:53 GMT
On Wed, 2011-06-15 at 13:11 -0500, Jason Funk wrote:

> User Makes Request- > Web Server processes and generates output -> My
> module analyzes ouput determines whether it should be passed back to the
> user or not.

Sounds like you have the right one, an output filter.  However, should
it really just delete the content it is checking for, rather than to try
and force an error response to the browser?  Or are you trying to end
with a 403 forbidden?

There should be output filters that can change things BEFORE the headers
are sent (see 
AP_FTYPE_RESOURCE).  PHP is one of those that behave this way.  Remember
though, that sending a bucket brigade on to the next filter may result
in the headings being sent.

If you use an output filter, loop through the buckets (don't flatten
them) to ensure everything is okay, before passing to the next filter.
If not, you can create a new bucket brigade and send that on.

Joe Lewis
Director - Systems Administration

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message