about summary refs log tree commit homepage
path: root/lib
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2009-03-10 18:02:35 -0700
committerEric Wong <normalperson@yhbt.net>2009-03-10 18:40:44 -0700
commit6d618ae6b83d893c6dee0d931ca2d5847cf0f598 (patch)
treeec25ef32b1604590a7726196a7bdcab7b7f2dc08 /lib
parentfc6e9adf0ecbfeb9a21f3aed6bc39200ba7b98a1 (diff)
downloadunicorn-6d618ae6b83d893c6dee0d931ca2d5847cf0f598.tar.gz
Just in case this stupid Ruby 1.9-ism creeps up on someone; I
haven't been able to reproduce I/O corruption from the test
cases, but better safe than sorry here.
Diffstat (limited to 'lib')
-rw-r--r--lib/unicorn/http_request.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/unicorn/http_request.rb b/lib/unicorn/http_request.rb
index 6e909b6..b06e3ae 100644
--- a/lib/unicorn/http_request.rb
+++ b/lib/unicorn/http_request.rb
@@ -99,6 +99,7 @@ module Unicorn
         @body = StringIO.new(http_body)
       else # huge body, put it in a tempfile
         @body = Tempfile.new(Const::UNICORN_TMP_BASE)
+        @body.binmode
         @body.sync = true
         @body.syswrite(http_body)
       end