diff options
author | Eric Wong <normalperson@yhbt.net> | 2009-07-01 13:49:29 -0700 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2009-07-01 13:49:29 -0700 |
commit | ec5d374768ced6aba3fed8a9481d2ac3c07cdb98 (patch) | |
tree | 01b1b7fb7ef59cc68acf041ba277d4203e5f4a22 | |
parent | ec14a20474575e77a23b713ee8fcda1e71b1d018 (diff) | |
download | unicorn-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.
-rw-r--r-- | lib/unicorn/tee_input.rb | 5 |
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 |