diff options
author | Joshua Peek <josh@joshpeek.com> | 2008-12-18 12:56:18 -0600 |
---|---|---|
committer | Joshua Peek <josh@joshpeek.com> | 2008-12-18 12:56:18 -0600 |
commit | 2e22c7fda00f78db79cb2dcc79495c085035240d (patch) | |
tree | 92c18edbcab2e2d0733b77604838fe7ee3e53cd5 /actionpack/lib/action_controller/session/abstract_store.rb | |
parent | 2eb2ec9e635c740684673495ed547d1c0769038d (diff) | |
download | rails-2e22c7fda00f78db79cb2dcc79495c085035240d.tar.gz rails-2e22c7fda00f78db79cb2dcc79495c085035240d.tar.bz2 rails-2e22c7fda00f78db79cb2dcc79495c085035240d.zip |
Conditionally inject session middleware instead of using session management
Diffstat (limited to 'actionpack/lib/action_controller/session/abstract_store.rb')
-rw-r--r-- | actionpack/lib/action_controller/session/abstract_store.rb | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/actionpack/lib/action_controller/session/abstract_store.rb b/actionpack/lib/action_controller/session/abstract_store.rb index 7874ee5a28..2218152c2c 100644 --- a/actionpack/lib/action_controller/session/abstract_store.rb +++ b/actionpack/lib/action_controller/session/abstract_store.rb @@ -60,7 +60,7 @@ module ActionController end DEFAULT_OPTIONS = { - :key => 'rack.session', + :key => '_session_id', :path => '/', :domain => nil, :expire_after => nil, @@ -70,6 +70,18 @@ module ActionController } def initialize(app, options = {}) + # Process legacy CGI options + options = options.symbolize_keys + if options.has_key?(:session_path) + options[:path] = options.delete(:session_path) + end + if options.has_key?(:session_key) + options[:key] = options.delete(:session_key) + end + if options.has_key?(:session_http_only) + options[:httponly] = options.delete(:session_http_only) + end + @app = app @default_options = DEFAULT_OPTIONS.merge(options) @key = @default_options[:key] |