Skip to content

Commit

Permalink
Rationalise the session options to one hash, prevents rack or integra…
Browse files Browse the repository at this point in the history
…tion tests from seeing incorrect defaults
  • Loading branch information
NZKoz committed Jan 21, 2009
1 parent 97bc170 commit b75e2f3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
2 changes: 2 additions & 0 deletions actionpack/CHANGELOG
Original file line number Original file line Diff line number Diff line change
@@ -1,5 +1,7 @@
*2.2.3 (pending release)* *2.2.3 (pending release)*


* Rationalise the session options to one hash, prevents rack or integration tests from seeing in correct defaults. [Koz]

* I18n: translate number_to_human_size. Add storage_units: [Bytes, KB, MB, GB, TB] to your translations. #1448 [Yaroslav Markin] * I18n: translate number_to_human_size. Add storage_units: [Bytes, KB, MB, GB, TB] to your translations. #1448 [Yaroslav Markin]


* Fixed the AssetTagHelper cache to use the computed asset host as part of the cache key instead of just assuming the its a string #1299 [DHH] * Fixed the AssetTagHelper cache to use the computed asset host as part of the cache key instead of just assuming the its a string #1299 [DHH]
Expand Down
10 changes: 2 additions & 8 deletions actionpack/lib/action_controller/rack_process.rb
Original file line number Original file line Diff line number Diff line change
@@ -1,5 +1,6 @@
require 'action_controller/cgi_ext' require 'action_controller/cgi_ext'
require 'action_controller/session/cookie_store' require 'action_controller/session/cookie_store'
require 'action_controller/cgi_process'


module ActionController #:nodoc: module ActionController #:nodoc:
class RackRequest < AbstractRequest #:nodoc: class RackRequest < AbstractRequest #:nodoc:
Expand All @@ -9,14 +10,7 @@ class RackRequest < AbstractRequest #:nodoc:
class SessionFixationAttempt < StandardError #:nodoc: class SessionFixationAttempt < StandardError #:nodoc:
end end


DEFAULT_SESSION_OPTIONS = { DEFAULT_SESSION_OPTIONS = ActionController::CgiRequest::DEFAULT_SESSION_OPTIONS
:database_manager => CGI::Session::CookieStore, # store data in cookie
:prefix => "ruby_sess.", # prefix session file names
:session_path => "/", # available to all paths in app
:session_key => "_session_id",
:cookie_only => true,
:session_http_only=> true
}


def initialize(env, session_options = DEFAULT_SESSION_OPTIONS) def initialize(env, session_options = DEFAULT_SESSION_OPTIONS)
@session_options = session_options @session_options = session_options
Expand Down

0 comments on commit b75e2f3

Please sign in to comment.