diff options
-rw-r--r-- | lib/unicorn/app/exec_cgi.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/unicorn/app/exec_cgi.rb b/lib/unicorn/app/exec_cgi.rb index b0fbedc..861d5e6 100644 --- a/lib/unicorn/app/exec_cgi.rb +++ b/lib/unicorn/app/exec_cgi.rb @@ -121,12 +121,12 @@ module Unicorn::App if inp.respond_to?(:fileno) && Integer === inp.fileno inp elsif inp.size == 0 # inp could be a StringIO or StringIO-like object - ::File.open('/dev/null') + ::File.open('/dev/null', 'rb') else tmp = Unicorn::Util.tmpio # Rack::Lint::InputWrapper doesn't allow sysread :( - buf = '' + buf = Unicorn::Z.dup while inp.read(CHUNK_SIZE, buf) tmp.syswrite(buf) end |