diff options
author | Eric Wong <normalperson@yhbt.net> | 2010-11-16 13:51:24 -0800 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2010-11-16 15:53:27 -0800 |
commit | 431de671a29b312bd19e615bd4bd99228b0c8b13 (patch) | |
tree | 94da785421c81b1ef2aebccf4549bf5c76b8bec6 /lib/unicorn/preread_input.rb | |
parent | 17a734a9f6ccea8c969a574f09b5d8dd3d568a9c (diff) | |
download | unicorn-431de671a29b312bd19e615bd4bd99228b0c8b13.tar.gz |
We may get "rack.input" objects that are not rewindable in the future, so be prepared for those and do no harm.
Diffstat (limited to 'lib/unicorn/preread_input.rb')
-rw-r--r-- | lib/unicorn/preread_input.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/unicorn/preread_input.rb b/lib/unicorn/preread_input.rb index ec83cb2..7a315b7 100644 --- a/lib/unicorn/preread_input.rb +++ b/lib/unicorn/preread_input.rb @@ -20,7 +20,7 @@ class PrereadInput def call(env) buf = "" input = env["rack.input"] - if buf = input.read(16384) + if input.respond_to?(:rewind) true while input.read(16384, buf) input.rewind end |