From c745f4780442271a2a2dcead4567b3fec9057630 Mon Sep 17 00:00:00 2001 From: Marcel Molina Date: Sat, 29 Apr 2006 05:06:49 +0000 Subject: Use #flush between switching from #write to #syswrite. Closes #4907. [Blair Zajac ] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4306 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/CHANGELOG | 2 ++ actionpack/lib/action_controller/cgi_process.rb | 3 +++ 2 files changed, 5 insertions(+) (limited to 'actionpack') diff --git a/actionpack/CHANGELOG b/actionpack/CHANGELOG index 5c312317d6..681206720e 100644 --- a/actionpack/CHANGELOG +++ b/actionpack/CHANGELOG @@ -1,5 +1,7 @@ *SVN* +* Use #flush between switching from #write to #syswrite. Closes #4907. [Blair Zajac ] + * Documentation fix: integration test scripts don't require integration_test. Closes #4914. [Frederick Ros ] * ActionController::Base Summary documentation rewrite. Closes #4900. [kevin.clark@gmail.com] diff --git a/actionpack/lib/action_controller/cgi_process.rb b/actionpack/lib/action_controller/cgi_process.rb index 09a6000b9f..05e9886ab0 100644 --- a/actionpack/lib/action_controller/cgi_process.rb +++ b/actionpack/lib/action_controller/cgi_process.rb @@ -180,6 +180,9 @@ end_msg if @cgi.send(:env_table)['REQUEST_METHOD'] == 'HEAD' return elsif @body.respond_to?(:call) + # Flush the output now in case the @body Proc uses + # #syswrite. + output.flush if output.respond_to?(:flush) @body.call(self, output) else output.write(@body) -- cgit v1.2.3