From 5a0a190253434d3eef5332d979d56f3e16e876bd Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Thu, 3 Jun 2010 14:55:37 -0700 Subject: writer_thread_*: fix static file response under 1.8 While these models are designed to work with IO.copy_stream under Ruby 1.9, it should be possible to run them under Ruby 1.8 without returning corrupt responses. The large file response test is beefed up to compare SHA1 checksums of the served file, not just sizes. --- lib/rainbows/writer_thread_spawn.rb | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'lib/rainbows/writer_thread_spawn.rb') diff --git a/lib/rainbows/writer_thread_spawn.rb b/lib/rainbows/writer_thread_spawn.rb index 95a04c0..0a8988f 100644 --- a/lib/rainbows/writer_thread_spawn.rb +++ b/lib/rainbows/writer_thread_spawn.rb @@ -88,12 +88,8 @@ module Rainbows end end - if IO.respond_to?(:copy_stream) - undef_method :write_body - - def write_body(my_sock, body) - my_sock.write_body(body) - end + def write_body(my_sock, body) + my_sock.write_body(body) end def process_client(client) -- cgit v1.2.3-24-ge0c7