about summary refs log tree commit homepage
path: root/lib/unicorn/tee_input.rb
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2009-07-01 13:49:29 -0700
committerEric Wong <normalperson@yhbt.net>2009-07-01 13:49:29 -0700
commitec5d374768ced6aba3fed8a9481d2ac3c07cdb98 (patch)
tree01b1b7fb7ef59cc68acf041ba277d4203e5f4a22 /lib/unicorn/tee_input.rb
parentec14a20474575e77a23b713ee8fcda1e71b1d018 (diff)
downloadunicorn-ec5d374768ced6aba3fed8a9481d2ac3c07cdb98.tar.gz
This was causing the first part of the body to be missing when
an HTTP client failed to delay between sending the header and
body in the request.
Diffstat (limited to 'lib/unicorn/tee_input.rb')
-rw-r--r--lib/unicorn/tee_input.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/unicorn/tee_input.rb b/lib/unicorn/tee_input.rb
index 3d19d7e..8dd8954 100644
--- a/lib/unicorn/tee_input.rb
+++ b/lib/unicorn/tee_input.rb
@@ -21,7 +21,10 @@ module Unicorn
       @tmp.binmode
       @tmp.sync = true
 
-      @tmp.write(body) if body
+      if body
+        @tmp.write(body)
+        @tmp.seek(0)
+      end
       @input = input
       @size = size # nil if chunked
     end