You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modules-dev@httpd.apache.org by Joost <jo...@bingopaleis.com> on 2006/09/26 22:41:41 UTC

Deny connection based on size of response

Hello,

I'm trying to deny or accept an incoming http request by looking at the size of
the response (Apache 2.0). Under certain circumstances I want to deny a request
if the size of the to-be-sent content exceeds a certain value. So the value I'm
interested in is "bytes_sent" in the "request_rec" struct. But this value only
seems to be set when the connection already has been accepted; it is always zero
if I look at it using "ap_hook_handler". I am able to inspect the "size"
attribute of "finfo", but that isn't correct, a tiny php script can generate
lots of content. I'm new at writing Apache 2.0 modules and due to the lack of
documentation I could need some hints.
Thanks,

Joost