提交 c090e5e0 编写于 作者: C Cody Fauser 提交者: Joshua Peek

Restore cookie store httponly default to true. Remove extraneous dup of...

Restore cookie store httponly default to true. Remove extraneous dup of options on initialization [#1784 state:resolved]
Signed-off-by: NJoshua Peek <josh@joshpeek.com>
上级 9cefd5ea
......@@ -45,7 +45,7 @@ class CookieStore
:domain => nil,
:path => "/",
:expire_after => nil,
:httponly => false
:httponly => true
}.freeze
ENV_SESSION_KEY = "rack.session".freeze
......@@ -56,8 +56,6 @@ class CookieStore
class CookieOverflow < StandardError; end
def initialize(app, options = {})
options = options.dup
# Process legacy CGI options
options = options.symbolize_keys
if options.has_key?(:session_path)
......
......@@ -94,7 +94,7 @@ def test_setting_session_value
with_test_route_set do
get '/set_session_value'
assert_response :success
assert_equal ["_myapp_session=#{response.body}; path=/"],
assert_equal ["_myapp_session=#{response.body}; path=/; httponly"],
headers['Set-Cookie']
end
end
......@@ -148,7 +148,7 @@ def test_setting_session_value_after_session_reset
get '/set_session_value'
assert_response :success
session_payload = response.body
assert_equal ["_myapp_session=#{response.body}; path=/"],
assert_equal ["_myapp_session=#{response.body}; path=/; httponly"],
headers['Set-Cookie']
get '/call_reset_session'
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册