diff options
author | Eric Wong <normalperson@yhbt.net> | 2010-05-03 15:19:53 -0700 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2010-05-03 15:19:53 -0700 |
commit | 9f1131f5972ba90c1c54c76cc97633447142b307 (patch) | |
tree | c5ee918bfea67ffcd77b5b90ee2191ec2a5df129 /lib/rainbows/base.rb | |
parent | 1f3de8f8940fc7805c54d3d27e2074632ab5a0b0 (diff) | |
download | rainbows-9f1131f5972ba90c1c54c76cc97633447142b307.tar.gz |
Since Rainbows! is supported when exposed directly to the Internet, administrators may want to limit the amount of data a user may upload in a single request body to prevent a denial-of-service via disk space exhaustion. This amount may be specified in bytes, the default limit being 1024*1024 bytes (1 megabyte). To override this default, a user may specify `client_max_body_size' in the Rainbows! block of their server config file: Rainbows! do client_max_body_size 10 * 1024 * 1024 end Clients that exceed the limit will get a "413 Request Entity Too Large" response if the request body is too large and the connection will close. For chunked requests, we have no choice but to interrupt during the client upload since we have no prior knowledge of the request body size.
Diffstat (limited to 'lib/rainbows/base.rb')
-rw-r--r-- | lib/rainbows/base.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/rainbows/base.rb b/lib/rainbows/base.rb index 0cbc711..864b847 100644 --- a/lib/rainbows/base.rb +++ b/lib/rainbows/base.rb @@ -12,6 +12,7 @@ module Rainbows def init_worker_process(worker) super(worker) + MaxBody.setup G.tmp = worker.tmp # avoid spurious wakeups and blocking-accept() with 1.8 green threads |