aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2012-07-29 20:33:16 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2012-07-29 21:43:07 -0700
commitfa3c4ea6d0dee5995d0ac56699540eb9a3149224 (patch)
tree970df84c96e3e6fd40726be95dbfe9f08ca60833 /actionpack/lib/action_controller
parent4509494f702d58852ad47488ee1496dd34e31149 (diff)
downloadrails-fa3c4ea6d0dee5995d0ac56699540eb9a3149224.tar.gz
rails-fa3c4ea6d0dee5995d0ac56699540eb9a3149224.tar.bz2
rails-fa3c4ea6d0dee5995d0ac56699540eb9a3149224.zip
close the response when the response body is set so that normal render calls will work
Diffstat (limited to 'actionpack/lib/action_controller')
-rw-r--r--actionpack/lib/action_controller/metal/live.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/actionpack/lib/action_controller/metal/live.rb b/actionpack/lib/action_controller/metal/live.rb
index 226943ff26..4674f0348d 100644
--- a/actionpack/lib/action_controller/metal/live.rb
+++ b/actionpack/lib/action_controller/metal/live.rb
@@ -121,6 +121,11 @@ module ActionController # :nodoc:
@_response.await_commit
end
+ def response_body=(body)
+ super
+ response.stream.close if response
+ end
+
def set_response!(request)
if request.env["HTTP_VERSION"] == "HTTP/1.0"
super