git.net

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bug in mod_ratelimit?


Hi,

On Thu, Jul 19, 2018 at 10:16 PM, Cory McIntire <cory@xxxxxxxxxx> wrote:
>
> Upon some initial testing of the patch we have found some conditions to which this will still break, consider the following:
>
> Put something like this into your php file,
>
>         for ($i = 1; $i <= 2000; $i++) {
>             header("x$i: $i");
>         }

Yes I was thinking about this, currently mod_ratelimit is not able to
ratelimit headers when chunked encoding is to be used for the body.

This is because the http (header) filter assumes nothing retains the
headers in between itself and the chunked filter (which itself assumes
everything it receives is the body).

I'm looking at the best way to address this, possibly mod_ratelimit's
filter should be moved after the "CHUNK" filter (i.e.
AP_FTYPE_TRANSCODE)? The requirement seems to be after deflate but
before network filter...

Regards,
Yann.



( ! ) Warning: include(msgfooter.php): failed to open stream: No such file or directory in /var/www/git/apache2-developers/msg04328.html on line 95
Call Stack
#TimeMemoryFunctionLocation
10.0013362888{main}( ).../msg04328.html:0

( ! ) Warning: include(): Failed opening 'msgfooter.php' for inclusion (include_path='.:/var/www/git') in /var/www/git/apache2-developers/msg04328.html on line 95
Call Stack
#TimeMemoryFunctionLocation
10.0013362888{main}( ).../msg04328.html:0