about summary refs log tree commit homepage
path: root/lib/rainbows/writer_thread_spawn
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2011-05-16 19:04:06 +0000
committerEric Wong <normalperson@yhbt.net>2011-05-16 19:34:52 +0000
commit39f625fff05d457b01f088017f463a86d3b6c626 (patch)
treeeae2a3a759b70e0f6d12caefdf177d3eca418efe /lib/rainbows/writer_thread_spawn
parentd520222050ce88388ae5e446c63642d79cc9796e (diff)
downloadrainbows-39f625fff05d457b01f088017f463a86d3b6c626.tar.gz
This allows using IO::Splice.copy_stream from the "io_splice"
RubyGem on recent Linux systems.  This also allows users to
disable copy_stream usage entirely and use traditional
response_body.each calls which are compatible with all Rack
servers (to workaround bugs in IO.copy_stream under 1.9.2-p180).
Diffstat (limited to 'lib/rainbows/writer_thread_spawn')
-rw-r--r--lib/rainbows/writer_thread_spawn/client.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/rainbows/writer_thread_spawn/client.rb b/lib/rainbows/writer_thread_spawn/client.rb
index e5c8854..de51c17 100644
--- a/lib/rainbows/writer_thread_spawn/client.rb
+++ b/lib/rainbows/writer_thread_spawn/client.rb
@@ -21,7 +21,7 @@ class Rainbows::WriterThreadSpawn::Client < Struct.new(:to_io, :q, :thr)
       }
     end
 
-    if IO.respond_to?(:copy_stream) || IO.method_defined?(:trysendfile)
+    if Rainbows::Response::COPY_STREAM
       def write_response(status, headers, body, alive)
         self.q ||= queue_writer
         if body.respond_to?(:close)