httpd-apreq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stas Bekman <s...@stason.org>
Subject [apreq-2] partial input consume
Date Tue, 23 Sep 2003 22:11:39 GMT
I'm polishing the filter/in_str_consume test in mp2, since it has problems 
with clients on certain OSes. What the test is trying to test is using a 
filter to read just a bit of a posted data and then discarding the rest. Now 
the problem is that if the filter doesn't read up the data it wants to 
discard, and nobody else does that (.e.g. response handler could call 
$r->discard_request_body), but just returns EOS, the output client socket will 
get SIGPIPE, as not all the data will be read in. The proper solution is to 
read all the data even if the filter is going to dump it on the floor, but 
it's a waste of resources, since this data still goes through the chain of 
other filters. Now consider a case where someone is trying to DoS your server, 
yes apreq gives you the UPLOAD limit, but it'll still have to consume all the 
data. I wish there was a way to tell the in_core filter to quickly read and 
discard the data without sending it up to the filters stack.

e.g. get_brigade could have an optional argument telling the feeding filter 
that it shouldn't send any more data, which should reach the very first 
filter, which could just dump the data on the floor, wasting as few resource 
as possible.

__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


Mime
View raw message