about summary refs log tree commit homepage
path: root/lib/unicorn/http_request.rb
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2009-07-01 13:59:40 -0700
committerEric Wong <normalperson@yhbt.net>2009-07-01 14:12:07 -0700
commit06bf73975864b8e16ef1ee977f8424a0e5517fd6 (patch)
treeedb02fb04b9edf26dc7a8b9add0c5e5c6e43d8aa /lib/unicorn/http_request.rb
parentec5d374768ced6aba3fed8a9481d2ac3c07cdb98 (diff)
downloadunicorn-06bf73975864b8e16ef1ee977f8424a0e5517fd6.tar.gz
This change gives applications full control to deny clients
from uploading unwanted message bodies.  This also paves the
way for doing things like upload progress notification within
applications in a Rack::Lint-compatible manner.

Since we don't support HTTP keepalive, so we have more freedom
here by being able to close TCP connections and deny clients the
ability to write to us (and thus wasting our bandwidth).

While I could've left this feature off by default indefinitely
for maximum backwards compatibility (for arguably broken
applications), Unicorn is not and has never been about
supporting the lowest common denominator.
Diffstat (limited to 'lib/unicorn/http_request.rb')
-rw-r--r--lib/unicorn/http_request.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/unicorn/http_request.rb b/lib/unicorn/http_request.rb
index ad1e23f..779cd32 100644
--- a/lib/unicorn/http_request.rb
+++ b/lib/unicorn/http_request.rb
@@ -98,8 +98,7 @@ module Unicorn
           end
         end
 
-        inp = TeeInput.new(socket, length, body)
-        DEFAULTS[Const::STREAM_INPUT] ? inp : inp.consume
+        TeeInput.new(socket, length, body)
       else
         NULL_IO.closed? ? NULL_IO.reopen(Z) : NULL_IO
       end