From 9abb447a573751b87e26ce35f4f05d58290f4c41 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Thu, 8 Jul 2010 23:21:18 +0000 Subject: restore Rainbows::HttpResponse.write for Cramp Cramp monkey patches Rainbows internals for WebSockets support and we forgot about it. Add a new integration test to ensure this continues to work in the future (and force us to update the test for newer Cramp). --- lib/rainbows/writer_thread_spawn.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 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 9e793fc..b9bbad2 100644 --- a/lib/rainbows/writer_thread_spawn.rb +++ b/lib/rainbows/writer_thread_spawn.rb @@ -28,7 +28,7 @@ module Rainbows # used to wrap a BasicSocket to use with +q+ for all writes # this is compatible with IO.select class MySocket < Struct.new(:to_io, :q, :thr) - include Rainbows::HttpResponse + include Rainbows::Response def readpartial(size, buf = "") to_io.readpartial(size, buf) @@ -100,7 +100,7 @@ module Rainbows def worker_loop(worker) MySocket.const_set(:MAX, worker_connections) - Rainbows::HttpResponse.setup(MySocket) + Rainbows::Response.setup(MySocket) super(worker) # accept loop from Unicorn CUR.delete_if do |t,q| q << nil -- cgit v1.2.3-24-ge0c7