about summary refs log tree commit homepage
diff options
context:
space:
mode:
-rw-r--r--lib/unicorn/http_request.rb4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/unicorn/http_request.rb b/lib/unicorn/http_request.rb
index 1d978e6..31fcc3d 100644
--- a/lib/unicorn/http_request.rb
+++ b/lib/unicorn/http_request.rb
@@ -57,12 +57,10 @@ module Unicorn
 
       # short circuit the common case with small GET requests first
       if PARSER.headers(REQ, socket.readpartial(Const::CHUNK_SIZE, BUF)).nil?
-        data = BUF.dup # socket.readpartial will clobber data
-
         # Parser is not done, queue up more data to read and continue parsing
         # an Exception thrown from the PARSER will throw us out of the loop
         begin
-          BUF << socket.readpartial(Const::CHUNK_SIZE, data)
+          BUF << socket.readpartial(Const::CHUNK_SIZE)
         end while PARSER.headers(REQ, BUF).nil?
       end
       REQ[Const::RACK_INPUT] = 0 == PARSER.content_length ?