Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing the rate limiter reset value #15433

Merged
merged 2 commits into from
Dec 30, 2017
Merged

Fixing the rate limiter reset value #15433

merged 2 commits into from
Dec 30, 2017

Conversation

bizley
Copy link
Member

@bizley bizley commented Dec 29, 2017

Q A
Is bugfix? yes
New feature? no
Breaks BC? no
Tests pass? yes
Fixed issues #15432

@samdark samdark self-assigned this Dec 30, 2017
@samdark samdark added the type:bug Bug label Dec 30, 2017
@samdark samdark requested review from a team December 30, 2017 11:32
@samdark samdark added this to the 2.0.14 milestone Dec 30, 2017
@samdark samdark merged commit b8f4397 into yiisoft:master Dec 30, 2017
@samdark
Copy link
Member

samdark commented Dec 30, 2017

Merged. Thank you!

@bizley bizley deleted the 15432-rate-limit-reset branch December 30, 2017 12:17
@hector-del-rio
Copy link

Shouldn't this line be as follows?

$this->addRateLimitHeaders($response, $limit, $allowance - 1, (int) (($limit - $allowance - 1) * $window / $limit));

(Note the minus sign)

@bizley
Copy link
Member Author

bizley commented Dec 30, 2017

No because it's actually $limit - ($allowance - 1).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants