From d4a2b5dd2b85f4b2d3bb120ee1e1b0dde31bc25c Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Wed, 20 Oct 2010 17:48:58 -0700 Subject: unicorn 2.x updates + kgio We get basic internal API changes from Unicorn, code simplifications coming next. --- lib/rainbows/ev_core.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/rainbows/ev_core.rb') diff --git a/lib/rainbows/ev_core.rb b/lib/rainbows/ev_core.rb index bf00eed..9761144 100644 --- a/lib/rainbows/ev_core.rb +++ b/lib/rainbows/ev_core.rb @@ -88,7 +88,7 @@ module Rainbows class CapInput < Struct.new(:io, :client, :bytes_left) MAX_BODY = Unicorn::Const::MAX_BODY - Util = Unicorn::Util + TmpIO = Unicorn::TmpIO def self.err(client, msg) client.write(Const::ERROR_413_RESPONSE) @@ -104,9 +104,9 @@ module Rainbows if max && (len > max) err(client, "Content-Length too big: #{len} > #{max}") end - len <= MAX_BODY ? StringIO.new("") : Util.tmpio + len <= MAX_BODY ? StringIO.new("") : TmpIO.new else - max ? super(Util.tmpio, client, max) : Util.tmpio + max ? super(TmpIO.new, client, max) : TmpIO.new end end -- cgit v1.2.3-24-ge0c7