about summary refs log tree commit homepage
path: root/lib/unicorn/http_request.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/unicorn/http_request.rb')
-rw-r--r--lib/unicorn/http_request.rb8
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/unicorn/http_request.rb b/lib/unicorn/http_request.rb
index a9e9d23..ec215ae 100644
--- a/lib/unicorn/http_request.rb
+++ b/lib/unicorn/http_request.rb
@@ -81,11 +81,9 @@ module Unicorn
       PARAMS[Const::RACK_INPUT] = if (body = PARAMS.delete(:http_body))
         length = PARAMS[Const::CONTENT_LENGTH].to_i
 
-        if te = PARAMS[Const::HTTP_TRANSFER_ENCODING]
-          if /\Achunked\z/i =~ te
-            socket = ChunkedReader.new(PARAMS, socket, body)
-            length = body = nil
-          end
+        if /\Achunked\z/i =~ PARAMS[Const::HTTP_TRANSFER_ENCODING]
+          socket = ChunkedReader.new(PARAMS, socket, body)
+          length = body = nil
         end
 
         TeeInput.new(socket, length, body)