Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #15012 from schneems/schneems/headers-key

HTTP::Headers#key? correctly converts
  • Loading branch information...
commit 3b03c984208b84f60c8c834a5fa49ca1c9076945 1 parent fc8b67e
Yves Senn senny authored
4 actionpack/lib/action_dispatch/http/headers.rb
View
@@ -26,7 +26,9 @@ def []=(key, value)
@env[env_name(key)] = value
end
- def key?(key); @env.key? key; end
+ def key?(key)
+ @env.key? env_name(key)
+ end
alias :include? :key?
def fetch(key, *args, &block)
2  actionpack/test/dispatch/header_test.rb
View
@@ -55,6 +55,8 @@ class HeaderTest < ActiveSupport::TestCase
test "key?" do
assert @headers.key?("CONTENT_TYPE")
assert @headers.include?("CONTENT_TYPE")
+ assert @headers.key?("Content-Type")
+ assert @headers.include?("Content-Type")
end
test "fetch with block" do
Please sign in to comment.
Something went wrong with that request. Please try again.