diff options
author | Eric Wong <normalperson@yhbt.net> | 2010-07-04 22:16:52 +0000 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2010-07-04 22:34:09 +0000 |
commit | 39b178cdebe275cbc8ce19cf269bea7cd15ff4ca (patch) | |
tree | b7628ed278895fcf70ea3206956be586ac9e1ac5 /lib/rainbows/revactor.rb | |
parent | 75f5aa9a0d6b37a94afbea3121fc2c16e70a2b1d (diff) | |
download | rainbows-39b178cdebe275cbc8ce19cf269bea7cd15ff4ca.tar.gz |
This hopefully allows the "sendfile" gem to be required anywhere in the Rainbows!/Unicorn config file, and not have to be required via RUBYOPT or the '-r' command-line switch. We also modularize HttpResponse and avoids singleton methods in the response path. This (hopefully) makes it easier for individual concurrency models to share code and override individual methods.
Diffstat (limited to 'lib/rainbows/revactor.rb')
-rw-r--r-- | lib/rainbows/revactor.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/rainbows/revactor.rb b/lib/rainbows/revactor.rb index 7a063ab..de423a3 100644 --- a/lib/rainbows/revactor.rb +++ b/lib/rainbows/revactor.rb @@ -60,7 +60,7 @@ module Rainbows::Revactor alive = hp.keepalive? && G.alive out = [ alive ? CONN_ALIVE : CONN_CLOSE ] if hp.headers? - HttpResponse.write(client, response, out) + write_response(client, response, out) end while alive and hp.reset.nil? and env.clear rescue ::Revactor::TCP::ReadError rescue => e @@ -74,6 +74,7 @@ module Rainbows::Revactor # given a INT, QUIT, or TERM signal) def worker_loop(worker) init_worker_process(worker) + self.class.__send__(:alias_method, :write_body, :write_body_each) RD_ARGS[:timeout] = G.kato if G.kato > 0 nr = 0 limit = worker_connections |