httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yann Ylavic <ylavic....@gmail.com>
Subject Re: How to read data in a request handler and then return DECLINED without consuming the data in the bucket brigade?
Date Mon, 04 Jun 2018 18:21:43 GMT
On Mon, Jun 4, 2018 at 7:23 PM, Paul Callahan <paul@tcell.io> wrote:
>
> I did try with input filters.  The reason I'm trying to do this in a
> handler is because I want to return 403 to the browser if the request body
> has something unsavory in it.   With reverse proxied requests, it appears
> the input filter fires too late and if I try to send a bucket with 403 in
> it, it is ignored and a 400 goes back to the browser.

When interrupting the request with an error code, your filter should
do something like:
    ap_die(403, r);
    return AP_FILTER_ERROR;

>
> btw, Nick I bought your book - it was a great help :)

It once did it for me too :)


Regards,
Yann.

Mime
View raw message