diff options
author | Guillermo Iguaran <guilleiguaran@gmail.com> | 2013-06-24 14:24:03 -0700 |
---|---|---|
committer | Guillermo Iguaran <guilleiguaran@gmail.com> | 2013-06-24 14:24:03 -0700 |
commit | d6bc2fa5a9186874f620df02b630d0e1b1f5f900 (patch) | |
tree | 0d83085ec112ca7516f7aeb525663202e0115e5f /actionpack/test/dispatch | |
parent | a6dd2ed4af09b7969612c0aac2218795cd5d8370 (diff) | |
parent | 891fd78cd7664cefd68fa099796614668d52cafe (diff) | |
download | rails-d6bc2fa5a9186874f620df02b630d0e1b1f5f900.tar.gz rails-d6bc2fa5a9186874f620df02b630d0e1b1f5f900.tar.bz2 rails-d6bc2fa5a9186874f620df02b630d0e1b1f5f900.zip |
Merge pull request #11069 from ykzts/actiondispatch-ssl-secure-flag-igonore-case
Flag cookies as secure with ignore case in ActionDispatch::SSL
Diffstat (limited to 'actionpack/test/dispatch')
-rw-r--r-- | actionpack/test/dispatch/ssl_test.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/actionpack/test/dispatch/ssl_test.rb b/actionpack/test/dispatch/ssl_test.rb index 881a8474e1..61b55f3d82 100644 --- a/actionpack/test/dispatch/ssl_test.rb +++ b/actionpack/test/dispatch/ssl_test.rb @@ -124,6 +124,20 @@ class SSLTest < ActionDispatch::IntegrationTest response.headers['Set-Cookie'].split("\n") end + def test_flag_cookies_as_secure_with_ignore_case + self.app = ActionDispatch::SSL.new(lambda { |env| + headers = { + 'Content-Type' => "text/html", + 'Set-Cookie' => "problem=def; path=/; Secure; HttpOnly" + } + [200, headers, ["OK"]] + }) + + get "https://example.org/" + assert_equal ["problem=def; path=/; Secure; HttpOnly"], + response.headers['Set-Cookie'].split("\n") + end + def test_no_cookies self.app = ActionDispatch::SSL.new(lambda { |env| [200, {'Content-Type' => "text/html"}, ["OK"]] |