diff options
Diffstat (limited to 'lib/rainbows/rev/deferred_response.rb')
-rw-r--r-- | lib/rainbows/rev/deferred_response.rb | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/rainbows/rev/deferred_response.rb b/lib/rainbows/rev/deferred_response.rb index f0172d6..13396d8 100644 --- a/lib/rainbows/rev/deferred_response.rb +++ b/lib/rainbows/rev/deferred_response.rb @@ -4,19 +4,16 @@ # this is class is specific to Rev for writing large static files # or proxying IO-derived objects class Rainbows::Rev::DeferredResponse < ::Rev::IO - def initialize(io, client, do_chunk, body) + def initialize(io, client, body) super(io) - @client, @do_chunk, @body = client, do_chunk, body + @client, @body = client, body end def on_read(data) - @do_chunk and @client.write("#{data.size.to_s(16)}\r\n") @client.write(data) - @do_chunk and @client.write("\r\n") end def on_close - @do_chunk and @client.write("0\r\n\r\n") @client.next @body.respond_to?(:close) and @body.close end |