aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch/middleware/session
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2009-12-27 12:09:20 +0100
committerJosé Valim <jose.valim@gmail.com>2009-12-27 12:09:20 +0100
commit47e5caa96bffc04c8c0b287a975a609fb048e530 (patch)
tree653d360dc9ad7eb7c5d2338840e15ab8b28a902b /actionpack/lib/action_dispatch/middleware/session
parentfd58a2d1da04508a7fdf825143e61d186112e63e (diff)
parentd92c4a84023bc0c8dd75869c9b4d5e50277f4650 (diff)
downloadrails-47e5caa96bffc04c8c0b287a975a609fb048e530.tar.gz
rails-47e5caa96bffc04c8c0b287a975a609fb048e530.tar.bz2
rails-47e5caa96bffc04c8c0b287a975a609fb048e530.zip
Merge Mail with latest Rails and move mail gem to Gemfile.
Diffstat (limited to 'actionpack/lib/action_dispatch/middleware/session')
-rw-r--r--actionpack/lib/action_dispatch/middleware/session/abstract_store.rb1
-rw-r--r--actionpack/lib/action_dispatch/middleware/session/cookie_store.rb9
2 files changed, 6 insertions, 4 deletions
diff --git a/actionpack/lib/action_dispatch/middleware/session/abstract_store.rb b/actionpack/lib/action_dispatch/middleware/session/abstract_store.rb
index c5c06f74a2..7d4f0998ce 100644
--- a/actionpack/lib/action_dispatch/middleware/session/abstract_store.rb
+++ b/actionpack/lib/action_dispatch/middleware/session/abstract_store.rb
@@ -1,4 +1,5 @@
require 'rack/utils'
+require 'rack/request'
module ActionDispatch
module Session
diff --git a/actionpack/lib/action_dispatch/middleware/session/cookie_store.rb b/actionpack/lib/action_dispatch/middleware/session/cookie_store.rb
index bd552b458a..f27f22c7e7 100644
--- a/actionpack/lib/action_dispatch/middleware/session/cookie_store.rb
+++ b/actionpack/lib/action_dispatch/middleware/session/cookie_store.rb
@@ -1,4 +1,5 @@
-require "active_support/core_ext/hash/keys"
+require 'active_support/core_ext/hash/keys'
+require 'rack/request'
module ActionDispatch
module Session
@@ -49,7 +50,7 @@ module ActionDispatch
:expire_after => nil,
:httponly => true
}.freeze
-
+
class OptionsHash < Hash
def initialize(by, env, default_options)
@session_data = env[CookieStore::ENV_SESSION_KEY]
@@ -60,7 +61,7 @@ module ActionDispatch
key == :id ? @session_data[:session_id] : super(key)
end
end
-
+
ENV_SESSION_KEY = "rack.session".freeze
ENV_SESSION_OPTIONS_KEY = "rack.session.options".freeze
HTTP_SET_COOKIE = "Set-Cookie".freeze
@@ -102,7 +103,7 @@ module ActionDispatch
def call(env)
env[ENV_SESSION_KEY] = AbstractStore::SessionHash.new(self, env)
env[ENV_SESSION_OPTIONS_KEY] = OptionsHash.new(self, env, @default_options)
-
+
status, headers, body = @app.call(env)
session_data = env[ENV_SESSION_KEY]