Abstract backend bug #2

shieldui opened this Issue Oct 20, 2013 · 2 comments


None yet
2 participants

Hi. I found a bug in https://github.com/Wu-Wu/Plack-Middleware-Throttle-Lite/blob/master/lib/Plack/Middleware/Throttle/Lite/Backend/Abstract.pm#L73

This will always return 'req/hour' as there is no "unit" setup for each unit in $settings href in the function above.

Possible soultions are:
a) add the corresponding "unit" to each of the units hrefs in the settings, or
b) change the line in the beginning of the bug to something like:
my $unit = $self->units || 'req/hour';

This bug is kind of critical, because currently Throttle::Lite works properly only with req/hour limits for backends that rely on expires_in

Wu-Wu added a commit that referenced this issue Oct 21, 2013


Wu-Wu commented Oct 21, 2013

Hi. Thanks.
Now should work fine. Give me a couple of days to release a new version to the CPAN.

Thanks :)

@shieldui shieldui closed this Oct 21, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment