So what option do I have? Cache all the buckets of the request without passing anything down the chain so I can make the decision about what to do? Would that even require caching them in the filter's ctx?
Do I have any other choice? On Tue, Jun 14, 2011 at 5:12 PM, Nick Kew <n...@apache.org> wrote: > On Tue, 14 Jun 2011 16:31:22 -0500 > Jason Funk <jasonlf...@gmail.com> wrote: > > > I am writing an output filter module that will under some circumstances > want > > to send back an HTTP Error Code and kill the request without sending back > > the content. > > You can't set an HTTP response code when one has already been sent > down the wire to the client. It's in the nature of an output > filter that the work is done in a callback, which (in general) > only happens after the response has started, and too late to > set a response code or headers. Thus the filter callback API > isn't designed to set a status like a processing hook can > when it determines the outcome of a request. > > The only way you can affect a response status is to return an > error to your caller before passing anything down the chain. > > > -- > Nick Kew > > Available for work, contract or permanent. > http://www.webthing.com/~nick/cv.html >