diff options
author | Andrew White <andyw@pixeltrix.co.uk> | 2012-12-07 06:02:43 +0000 |
---|---|---|
committer | Andrew White <andyw@pixeltrix.co.uk> | 2012-12-07 06:02:43 +0000 |
commit | af73e3cb15c966129221009f1de35dea8de6578e (patch) | |
tree | 9198ef801d6626b0b30e686700390ca6b8e4b977 /actionpack/lib | |
parent | 55dec5a7da3e0bed51b1a37d152df9c7395e5a80 (diff) | |
download | rails-af73e3cb15c966129221009f1de35dea8de6578e.tar.gz rails-af73e3cb15c966129221009f1de35dea8de6578e.tar.bz2 rails-af73e3cb15c966129221009f1de35dea8de6578e.zip |
Revert "Invert precedence of content in ActionDispatch::Static"
This reverts commit c59734f756b79c39486c45273d2cc5d42cd0c864.
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_dispatch/middleware/static.rb | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/actionpack/lib/action_dispatch/middleware/static.rb b/actionpack/lib/action_dispatch/middleware/static.rb index 65670b0ff1..e3b15b43b9 100644 --- a/actionpack/lib/action_dispatch/middleware/static.rb +++ b/actionpack/lib/action_dispatch/middleware/static.rb @@ -51,20 +51,16 @@ module ActionDispatch end def call(env) - path = env['PATH_INFO'].chomp('/') - response = @app.call(env) - - if response[1]['X-Cascade'] == 'pass' - case env['REQUEST_METHOD'] - when 'GET', 'HEAD' - if match = @file_handler.match?(path) - env["PATH_INFO"] = match - return @file_handler.call(env) - end + case env['REQUEST_METHOD'] + when 'GET', 'HEAD' + path = env['PATH_INFO'].chomp('/') + if match = @file_handler.match?(path) + env["PATH_INFO"] = match + return @file_handler.call(env) end end - response + @app.call(env) end end end |