aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/dispatch/ssl_test.rb
diff options
context:
space:
mode:
authorYamagishi Kazutoshi <ykzts@desire.sh>2013-06-24 18:01:30 +0900
committerYamagishi Kazutoshi <ykzts@desire.sh>2013-06-24 18:01:30 +0900
commit891fd78cd7664cefd68fa099796614668d52cafe (patch)
tree4152a430b607b21782532da6b176b3195df9e1a7 /actionpack/test/dispatch/ssl_test.rb
parentf6cdc2282ff4a34e4d0230b80d945f9c898d6973 (diff)
downloadrails-891fd78cd7664cefd68fa099796614668d52cafe.tar.gz
rails-891fd78cd7664cefd68fa099796614668d52cafe.tar.bz2
rails-891fd78cd7664cefd68fa099796614668d52cafe.zip
Flag cookies as secure with ignore case in ActionDispatch::SSL
Diffstat (limited to 'actionpack/test/dispatch/ssl_test.rb')
-rw-r--r--actionpack/test/dispatch/ssl_test.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/actionpack/test/dispatch/ssl_test.rb b/actionpack/test/dispatch/ssl_test.rb
index a9bea7ea73..33e65206c6 100644
--- a/actionpack/test/dispatch/ssl_test.rb
+++ b/actionpack/test/dispatch/ssl_test.rb
@@ -119,6 +119,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"]]