Class PhusionPassenger::Utils::TeeInput
In: lib/phusion_passenger/utils/tee_input.rb
Parent: Object

acts like tee(1) on an input input to provide a input-like stream while providing rewindable semantics through a File/StringIO backing store. On the first pass, the input is only read on demand so your Rack application can use input notification (upload progress and like). This should fully conform to the Rack::Lint::InputWrapper specification on the public API. This class is intended to be a strict interpretation of Rack::Lint::InputWrapper functionality and will not support any deviations from it.

When processing uploads, Unicorn exposes a TeeInput object under "rack.input" of the Rack environment.

Methods

Constants

CONTENT_LENGTH = "CONTENT_LENGTH".freeze
HTTP_TRANSFER_ENCODING = "HTTP_TRANSFER_ENCODING".freeze
CHUNKED = "chunked".freeze

Public Class methods

returns the maximum size of request bodies to buffer in memory, amounts larger than this are buffered to the filesystem

sets the maximum size of request bodies to buffer in memory, amounts larger than this are buffered to the filesystem

Initializes a new TeeInput object. You normally do not have to call this unless you are writing an HTTP server.

Public Instance methods

[Validate]