diff options
author | José Valim <jose.valim@gmail.com> | 2010-09-22 21:40:14 +0200 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-10-03 21:25:22 +0200 |
commit | 74dd8a3681c6984ea35c879f88c6a87521b58ec2 (patch) | |
tree | 4952e210123b31c4149cf1747a00c619be5d3fa5 /railties/lib/rails | |
parent | 50215f9525b6b5e3bfe703724b9f68177ed8565d (diff) | |
download | rails-74dd8a3681c6984ea35c879f88c6a87521b58ec2.tar.gz rails-74dd8a3681c6984ea35c879f88c6a87521b58ec2.tar.bz2 rails-74dd8a3681c6984ea35c879f88c6a87521b58ec2.zip |
Move ETag and ConditionalGet logic from AD::Response to the middleware stack.
Diffstat (limited to 'railties/lib/rails')
-rw-r--r-- | railties/lib/rails/application.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/railties/lib/rails/application.rb b/railties/lib/rails/application.rb index 4d04184b20..075e3c5692 100644 --- a/railties/lib/rails/application.rb +++ b/railties/lib/rails/application.rb @@ -145,8 +145,8 @@ module Rails rack_cache = config.action_controller.perform_caching && config.action_dispatch.rack_cache require "action_dispatch/http/rack_cache" if rack_cache + middleware.use ::Rack::Cache, rack_cache if rack_cache - middleware.use ::Rack::Cache, rack_cache if rack_cache middleware.use ::ActionDispatch::Static, config.static_asset_paths if config.serve_static_assets middleware.use ::Rack::Lock if !config.allow_concurrency middleware.use ::Rack::Runtime @@ -165,6 +165,8 @@ module Rails middleware.use ::ActionDispatch::ParamsParser middleware.use ::Rack::MethodOverride middleware.use ::ActionDispatch::Head + middleware.use ::Rack::ConditionalGet + middleware.use ::Rack::ETag, "no-cache" middleware.use ::ActionDispatch::BestStandardsSupport, config.action_dispatch.best_standards_support if config.action_dispatch.best_standards_support end end |