class Stream
The input stream is an IO-like object which contains the raw HTTP POST data. When applicable, its external encoding must be “ASCII-8BIT” and it must be opened in binary mode, for Ruby 1.9 compatibility. The input stream must respond to gets, each, read and rewind.
Nested
Definitions
def close_write
close must never be called on the input stream. huh?
Implementation
def close_write
@output&.close
@output = nil
end
def close(error = nil)
Close the input and output bodies.
Implementation
def close(error = nil)
self.close_read
self.close_write
return nil
ensure
@closed = true
end
def closed?
Whether the stream has been closed.
Implementation
def closed?
@closed
end
def empty?
Whether there are any output chunks remaining?
Implementation
def empty?
@output.empty?
end