diff options
Diffstat (limited to 'lib/unicorn/http_server.rb')
-rw-r--r-- | lib/unicorn/http_server.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/unicorn/http_server.rb b/lib/unicorn/http_server.rb index 69b7cc8..f0dca7c 100644 --- a/lib/unicorn/http_server.rb +++ b/lib/unicorn/http_server.rb @@ -355,6 +355,15 @@ class Unicorn::HttpServer kill_each_worker(:KILL) end + def rewindable_input + Unicorn::HttpRequest.input_class.method_defined?(:rewind) + end + + def rewindable_input=(bool) + Unicorn::HttpRequest.input_class = bool ? + Unicorn::TeeInput : Unicorn::StreamInput + end + private # wait for a signal hander to wake us up and then consume the pipe |