From 95cec890409ac07d51c87ab157fe7e101d6f8432 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Tue, 10 May 2011 16:33:07 -0700 Subject: max_body: documentation updates It can't be used as middleware for fully-buffering concurrency models. --- lib/rainbows/max_body.rb | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/lib/rainbows/max_body.rb b/lib/rainbows/max_body.rb index aedc9e9..a8abbf7 100644 --- a/lib/rainbows/max_body.rb +++ b/lib/rainbows/max_body.rb @@ -17,7 +17,25 @@ # use Rainbows::MaxBody, 1024*1024*10 # run MyApp # end - +# +# This is only compatible with concurrency models that expose a streaming +# "rack.input" to the Rack application. Thus it is NOT compatible with +# any of the following as they fully buffer the request body before +# the application dispatch: +# +# * :Coolio +# * :CoolioThreadPool +# * :CoolioThreadSpawn +# * :Epoll +# * :EventMachine +# * :NeverBlock +# * :Rev +# * :RevThreadPool +# * :RevThreadSpawn +# * :XEpoll +# +# However, the global Rainbows::Configurator#client_max_body_size is compatible +# with all concurrency models \Rainbows! supports. class Rainbows::MaxBody # This is automatically called when used with Rack::Builder#use -- cgit v1.2.3-24-ge0c7