about summary refs log tree commit homepage
path: root/lib/upr/input_wrapper.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/upr/input_wrapper.rb')
-rw-r--r--lib/upr/input_wrapper.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/upr/input_wrapper.rb b/lib/upr/input_wrapper.rb
index 5268498..7c7a0d9 100644
--- a/lib/upr/input_wrapper.rb
+++ b/lib/upr/input_wrapper.rb
@@ -38,8 +38,8 @@ module Upr
         /\A100-continue\z/i =~ env['HTTP_EXPECT'] and return [ 100, {}, [] ]
 
         length = env["CONTENT_LENGTH"] and length = length.to_i
-        env["TRANSFER_ENCODING"] =~ %r{\Achunked\z}i and length = nil
-        if length.nil? || length > 0
+        chunked = env["TRANSFER_ENCODING"] =~ %r{\Achunked\z}i and length = nil
+        if chunked || (length && length > 0)
           if uid = extract_upload_id(env)
             return dup._call(env, uid, length)
           end