aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/lib')
-rw-r--r--actionpack/lib/action_controller/cgi_process.rb14
1 files changed, 8 insertions, 6 deletions
diff --git a/actionpack/lib/action_controller/cgi_process.rb b/actionpack/lib/action_controller/cgi_process.rb
index 62bbd02e32..51a0433a89 100644
--- a/actionpack/lib/action_controller/cgi_process.rb
+++ b/actionpack/lib/action_controller/cgi_process.rb
@@ -95,12 +95,14 @@ module ActionController #:nodoc:
if @session_options == false
@session = Hash.new
else
- if session_options_with_string_keys['new_session'] == true
- @session = new_session
- else
- @session = CGI::Session.new(@cgi, session_options_with_string_keys)
+ stale_session_check! do
+ if session_options_with_string_keys['new_session'] == true
+ @session = new_session
+ else
+ @session = CGI::Session.new(@cgi, session_options_with_string_keys)
+ end
+ @session['__valid_session']
end
- stale_session_check!
end
end
@session
@@ -127,7 +129,7 @@ module ActionController #:nodoc:
end
def stale_session_check!
- @session['__valid_session']
+ yield
rescue ArgumentError => argument_error
if argument_error.message =~ %r{undefined class/module (\w+)}
begin