From 14ce889cc12628405b0f6a1842b7e1ad09ca4b7b Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sat, 27 Jun 2009 15:58:45 -0700 Subject: Make TeeInput easier to use The complexity of making the object persistent isn't worth the potential performance gain here. --- lib/unicorn/http_request.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'lib/unicorn/http_request.rb') diff --git a/lib/unicorn/http_request.rb b/lib/unicorn/http_request.rb index d9cb8b2..e25517b 100644 --- a/lib/unicorn/http_request.rb +++ b/lib/unicorn/http_request.rb @@ -27,7 +27,6 @@ module Unicorn } NULL_IO = StringIO.new(Z) - TEE = TeeInput.new DECHUNKER = ChunkedReader.new LOCALHOST = '127.0.0.1'.freeze @@ -104,7 +103,7 @@ module Unicorn end end - inp = TEE.reopen(socket, length, body) + inp = TeeInput.new(socket, length, body) DEFAULTS[Const::STREAM_INPUT] ? inp : inp.consume else NULL_IO.closed? ? NULL_IO.reopen(Z) : NULL_IO -- cgit v1.2.3-24-ge0c7