Skip Menu |

This queue is for tickets about the Apache-GTopLimit CPAN distribution.

Report information
The Basics
Id: 376
Status: resolved
Priority: 0/
Queue: Apache-GTopLimit

People
Owner: Nobody in particular
Requestors: chorny [...] tri.md
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 1.01
Fixed in: (no value)



I think, I have found an error in Apache::GTopLimit 1.10: return OK if (++$Apache::GTopLimit::REQUEST_COUNT < $Apache::GTopLimit::CHECK_EVERY_N_REQUESTS); $Apache::GTopLimit::REQUEST_COUNT = 1; Should be 0, not 1. (or change to $Apache::GTopLimit::REQUEST_COUNT++). Because on second request $Apache::GTopLimit::REQUEST_COUNT will be 2. If $Apache::GTopLimit::CHECK_EVERY_N_REQUESTS =2, then it will proceed on every request, not every other time. Logical explanation: current request is already counted, so next request should be number 1.
[guest - Tue Mar 19 10:55:45 2002]: Show quoted text
> I think, I have found an error in Apache::GTopLimit 1.10: > > return OK if > (++$Apache::GTopLimit::REQUEST_COUNT < > $Apache::GTopLimit::CHECK_EVERY_N_REQUESTS); > > $Apache::GTopLimit::REQUEST_COUNT = 1; > > Should be 0, not 1. (or change to > $Apache::GTopLimit::REQUEST_COUNT++). > Because on second request $Apache::GTopLimit::REQUEST_COUNT will be 2. > If $Apache::GTopLimit::CHECK_EVERY_N_REQUESTS =2, then it will > proceed on every request, not every other time. > > Logical explanation: current request is already counted, so next > request should be number 1.
Thanks Alexandr. The fixed version 1.02 is on its way to CPAN.