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

Fix issue with opting out of headers when using header_hash method #193

Merged
merged 1 commit into from
Dec 3, 2015

Conversation

oreoshake
Copy link
Contributor

The header_hash opt-out code was not consistent with the non-header-hash code. Mainly opting out of a header meant you would get an exception:

     NoMethodError:
       undefined method `name' for nil:NilClass
     # ./lib/secure_headers.rb:63:in `block in header_hash'
     # ./lib/secure_headers.rb:54:in `each'
     # ./lib/secure_headers.rb:54:in `inject'
     # ./lib/secure_headers.rb:54:in `header_hash'

I'm going to see if this issue exists on the 3.x branch as well.

/cc @moratorius

oreoshake added a commit that referenced this pull request Dec 3, 2015
Fix issue with opting out of headers when using header_hash method
@oreoshake oreoshake merged commit 6c02a63 into master Dec 3, 2015
@oreoshake oreoshake deleted the calling-name-on-nil-value branch December 3, 2015 23:27
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.

1 participant