diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2012-07-29 20:33:16 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2012-07-29 21:43:07 -0700 |
commit | fa3c4ea6d0dee5995d0ac56699540eb9a3149224 (patch) | |
tree | 970df84c96e3e6fd40726be95dbfe9f08ca60833 /actionpack/lib | |
parent | 4509494f702d58852ad47488ee1496dd34e31149 (diff) | |
download | rails-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')
-rw-r--r-- | actionpack/lib/action_controller/metal/live.rb | 5 |
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 |