diff options
author | schneems <richard.schneeman@gmail.com> | 2014-05-07 12:01:34 -0500 |
---|---|---|
committer | schneems <richard.schneeman@gmail.com> | 2014-05-07 12:01:34 -0500 |
commit | ca97ec509955d70bde47d337e5086920f0c79b63 (patch) | |
tree | ebc92027607789b0cd1a777c32dfdda54ed08789 /activerecord/test/cases/adapters/postgresql | |
parent | 98baa827ac5e3a7e0fd427febed066d013198371 (diff) | |
download | rails-ca97ec509955d70bde47d337e5086920f0c79b63.tar.gz rails-ca97ec509955d70bde47d337e5086920f0c79b63.tar.bz2 rails-ca97ec509955d70bde47d337e5086920f0c79b63.zip |
HTTP::Headers#key? correctly converts
Previously if you were looking for a given key, the header may incorrectly tell you that it did not exist even though it would return a valid value:
```ruby
env = { "CONTENT_TYPE" => "text/plain" }
headers = ActionDispatch::Http::Headers.new(env)
headers["Content-Type"]
# => "text/plain"
headers.key?("Content-Type")
# => false
```
This PR fixes that behavior by converting the key before checking for presence
Diffstat (limited to 'activerecord/test/cases/adapters/postgresql')
0 files changed, 0 insertions, 0 deletions