From 319ae4628f4e0058de3e40e4ca7791b17e45e70c Mon Sep 17 00:00:00 2001 From: Joshua Peek Date: Tue, 27 Jan 2009 18:54:01 -0600 Subject: Move HTTP libs and middleware into ActionDispatch component --- .../lib/action_controller/dispatch/middlewares.rb | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 actionpack/lib/action_controller/dispatch/middlewares.rb (limited to 'actionpack/lib/action_controller/dispatch/middlewares.rb') diff --git a/actionpack/lib/action_controller/dispatch/middlewares.rb b/actionpack/lib/action_controller/dispatch/middlewares.rb new file mode 100644 index 0000000000..3bf3dbebab --- /dev/null +++ b/actionpack/lib/action_controller/dispatch/middlewares.rb @@ -0,0 +1,21 @@ +use "Rack::Lock", :if => lambda { + !ActionController::Base.allow_concurrency +} + +use "ActionDispatch::Failsafe" + +["ActionDispatch::Session::CookieStore", + "ActionDispatch::Session::MemCacheStore", + "ActiveRecord::SessionStore"].each do |store| + use(store, ActionController::Base.session_options, + :if => lambda { + if session_store = ActionController::Base.session_store + session_store.name == store + end + } + ) +end + +use "ActionDispatch::RewindableInput" +use "ActionDispatch::ParamsParser" +use "Rack::MethodOverride" -- cgit v1.2.3