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

Opting out of all protection would raise an exception because the idempotency check was wrong #235

Merged
merged 1 commit into from
Mar 28, 2016

Conversation

oreoshake
Copy link
Contributor

idempotent_additions? would return false when comparing OPT_OUT with OPT_OUT, causing header_hash_for to return a header cache with { nil => nil } which cause the middleware to blow up when { nil => nil } was merged into the rack header hash.

This is a regression in 3.1.0 only.

Now it returns true. I've added a test case to ensure that header_hash_for will never return such an element.

@oreoshake oreoshake merged commit 6399816 into master Mar 28, 2016
@oreoshake oreoshake deleted the fix-opt-out-regression branch March 28, 2016 23:06
@coveralls
Copy link

Coverage Status

Coverage increased (+0.9%) to 96.2% when pulling 0358c8e on fix-opt-out-regression into 171ca58 on master.

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

Successfully merging this pull request may close these issues.

2 participants