aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/metal/live.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/lib/action_controller/metal/live.rb')
-rw-r--r--actionpack/lib/action_controller/metal/live.rb10
1 files changed, 8 insertions, 2 deletions
diff --git a/actionpack/lib/action_controller/metal/live.rb b/actionpack/lib/action_controller/metal/live.rb
index fe63cf2b98..41b997a755 100644
--- a/actionpack/lib/action_controller/metal/live.rb
+++ b/actionpack/lib/action_controller/metal/live.rb
@@ -125,9 +125,11 @@ module ActionController
end
def each
+ @response.sending!
while str = @buf.pop
yield str
end
+ @response.sent!
end
def close
@@ -179,12 +181,16 @@ module ActionController
private
- def finalize_response
+ def before_committed
super
jar = request.cookie_jar
# The response can be committed multiple times
jar.write self unless committed?
- jar.commit!
+ end
+
+ def before_sending
+ super
+ request.cookie_jar.commit!
headers.freeze
end