From 71716672752e573ff15002aaefd6e8ba8c6b6cb6 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Thu, 9 Dec 2010 03:39:03 +0000 Subject: allow client_buffer_body_size to be tuned Since modern machines have more memory these days and clients are sending more data, avoiding potentially slow filesystem operations for larger uploads can be useful for some applications. --- lib/unicorn/http_server.rb | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'lib/unicorn/http_server.rb') diff --git a/lib/unicorn/http_server.rb b/lib/unicorn/http_server.rb index 0bb4359..29b34d6 100644 --- a/lib/unicorn/http_server.rb +++ b/lib/unicorn/http_server.rb @@ -364,6 +364,14 @@ class Unicorn::HttpServer Unicorn::TeeInput : Unicorn::StreamInput end + def client_body_buffer_size + Unicorn::TeeInput.client_body_buffer_size + end + + def client_body_buffer_size=(bytes) + Unicorn::TeeInput.client_body_buffer_size = bytes + end + private # wait for a signal hander to wake us up and then consume the pipe -- cgit v1.2.3-24-ge0c7