From 4e0ffab8b05f5cc35996ac4866ee61cefb432af6 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Wed, 22 Jun 2005 12:59:36 +0000 Subject: Removed the mutex from the WEBrick adapter under the production environment so concurrent requests can be served git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1482 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/lib/action_controller/cgi_process.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'actionpack/lib/action_controller/cgi_process.rb') diff --git a/actionpack/lib/action_controller/cgi_process.rb b/actionpack/lib/action_controller/cgi_process.rb index 9166a8d433..e4e86615c0 100644 --- a/actionpack/lib/action_controller/cgi_process.rb +++ b/actionpack/lib/action_controller/cgi_process.rb @@ -124,20 +124,20 @@ module ActionController #:nodoc: super() end - def out + def out(output = $stdout) convert_content_type!(@headers) - $stdout.binmode if $stdout.respond_to?(:binmode) - $stdout.sync = false + output.binmode if output.respond_to?(:binmode) + output.sync = false if output.respond_to?(:sync=) begin - print @cgi.header(@headers) + output.write(@cgi.header(@headers)) if @cgi.send(:env_table)['REQUEST_METHOD'] == 'HEAD' return elsif @body.respond_to?(:call) @body.call(self) else - print @body + output.write(@body) end rescue Errno::EPIPE => e # lost connection to the FCGI process -- ignore the output, then -- cgit v1.2.3