Application_Timeouts CONTRIBUTORS DESIGN FAQ HACKING ISSUES KNOWN_ISSUES LICENSE Links NEWS PHILOSOPHY README SIGNALS Sandbox TUNING unicorn_1
Unicorn Configurator HttpServer OobGC PrereadInput StreamInput TeeInput Util Worker

Methods

#each #gets #read

class Unicorn::StreamInput

When processing uploads, unicorn may expose a StreamInput object under "rack.input" of the Rack environment when Unicorn::Configurator#rewindable_input is set to false

Public Instance Methods

ios.each { |line| block }  => ios source

Executes the block for every "line'' in ios, where lines are separated by the global record separator ($/, typically "n").

ios.gets   => string or nil source

Reads the next "line'' from the I/O stream; lines are separated by the global record separator ($/, typically "n"). A global record separator of nil reads the entire unread contents of ios. Returns nil if called at the end of file. This takes zero arguments for strict Rack::Lint compatibility, unlike IO#gets.

ios.read([length [, buffer ]]) => string, buffer, or nil source

Reads at most length bytes from the I/O stream, or to the end of file if length is omitted or is nil. length must be a non-negative integer or nil. If the optional buffer argument is present, it must reference a String, which will receive the data.

At end of file, it returns nil or '' depend on length. ios.read() and ios.read(nil) returns ''. ios.read(length [, buffer]) returns nil.

If the Content-Length of the HTTP request is known (as is the common case for POST requests), then ios.read(length [, buffer]) will block until the specified length is read (or it is the last chunk). Otherwise, for uncommon "Transfer-Encoding: chunked" requests, ios.read(length [, buffer]) will return immediately if there is any data and only block when nothing is available (providing IO#readpartial semantics).


Pages Classes Methods
mail archives: https://bogomips.org/unicorn-public/
	nntp://news.public-inbox.org/inbox.comp.lang.ruby.unicorn 
	nntp://news.gmane.org/gmane.comp.lang.ruby.unicorn.general 
public: unicorn-public@bogomips.org