about summary refs log tree commit homepage
path: root/lib/rainbows/http_server.rb
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2009-10-25 22:50:59 -0700
committerEric Wong <normalperson@yhbt.net>2009-10-26 02:26:22 -0700
commitc52c26c126f5c7d3871257fa41651fc91ccfd20e (patch)
tree2d2bcf5512f9831ff4f177aa0c2682bd75a9c436 /lib/rainbows/http_server.rb
parente4552b3db07fb5fb4816eae89f7feed50e5cd629 (diff)
downloadrainbows-c52c26c126f5c7d3871257fa41651fc91ccfd20e.tar.gz
This means Rainbows::DevFdBody async responses and large
file streaming without slurping.

This is only with eventmachine 0.12.8, it looks like 0.12.10
changes the attach/watch API...
Diffstat (limited to 'lib/rainbows/http_server.rb')
-rw-r--r--lib/rainbows/http_server.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/rainbows/http_server.rb b/lib/rainbows/http_server.rb
index 5521513..4c4b63b 100644
--- a/lib/rainbows/http_server.rb
+++ b/lib/rainbows/http_server.rb
@@ -33,7 +33,10 @@ module Rainbows
       extend(mod)
       Const::RACK_DEFAULTS['rainbows.model'] = @use = model
       Const::RACK_DEFAULTS['rack.multithread'] = !!(/Thread/ =~ model.to_s)
-      Const::RACK_DEFAULTS['rainbows.autochunk'] = (model.to_s == "Rev")
+      case model
+      when :Rev, :EventMachine
+        Const::RACK_DEFAULTS['rainbows.autochunk'] = true
+      end
     end
 
     def worker_connections(*args)