Parent

Methods

Rainbows::MaxBody

Middleware used to enforce client_max_body_size for TeeInput users.

There is no need to configure this middleware manually, it will automatically be configured for you based on the client_max_body_size setting.

For more fine-grained control, you may also define it per-endpoint in your Rack config.ru like this:

map "/limit_1M" do
  use Rainbows::MaxBody, 1024*1024
  run MyApp
end
map "/limit_10M" do
  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:

However, the global Rainbows::Configurator#client_max_body_size is compatible with all concurrency models Rainbows! supports.

Public Class Methods

new(app, limit = nil) view method source

This is automatically called when used with Rack::Builder#use

Originally generated with the Darkfish Rdoc Generator 2, modified by wrongdoc.

We love to hear from you!
Email patches (with git send-email), pull requests, questions, bug reports, suggestions, etc. to us publically at rainbows-talk@rubyforge.org.
No subscription to the mailing list is necessary, just let us know to Cc: you if you're unsubscribed.
To subscribe, email rainbows-talk-request@rubyforge.org with "subscribe" in the Subject and respond to the automated confirmation message.
Do not waste bandwidth with HTML, HTML mail will not be read.
Quote only parts you're responding to and do not top post.
For sensitive topics, email us privately at rainbows@bogomips.org.