aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2011-12-14 17:03:35 +0100
committerJosé Valim <jose.valim@gmail.com>2011-12-14 17:03:35 +0100
commite3a4eb4b4067ee7d906babd029e60565001f7808 (patch)
tree0a6777c56be3173130d92c5500ee34852685cba4 /actionpack/lib/action_dispatch
parent19bea9f1bd03b4601bf4c38539bff993d3eebc39 (diff)
downloadrails-e3a4eb4b4067ee7d906babd029e60565001f7808.tar.gz
rails-e3a4eb4b4067ee7d906babd029e60565001f7808.tar.bz2
rails-e3a4eb4b4067ee7d906babd029e60565001f7808.zip
Close the response body on cascade pass, closes #3975.
Diffstat (limited to 'actionpack/lib/action_dispatch')
-rw-r--r--actionpack/lib/action_dispatch/middleware/debug_exceptions.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/actionpack/lib/action_dispatch/middleware/debug_exceptions.rb b/actionpack/lib/action_dispatch/middleware/debug_exceptions.rb
index cd4af82c6e..3904183823 100644
--- a/actionpack/lib/action_dispatch/middleware/debug_exceptions.rb
+++ b/actionpack/lib/action_dispatch/middleware/debug_exceptions.rb
@@ -17,6 +17,8 @@ module ActionDispatch
# TODO: Maybe this should be in the router itself
if response[1]['X-Cascade'] == 'pass'
+ body = response[2]
+ body.close if body.respond_to?(:close)
raise ActionController::RoutingError, "No route matches [#{env['REQUEST_METHOD']}] #{env['PATH_INFO'].inspect}"
end
rescue Exception => exception