This may be used to generate a Rack response
By default we readpartial at most 16K off a socket at once
this is expected to be called by our Rack server, it will close our given sock object if keepalive is not used otherwise it will just reset the parser and clear the header object
this method allows our Kcar::Response object to be used as a Rack response body. It may only be called once (usually by a Rack server) as it streams the response body off the our socket object.
returns a 3-element array suitable for use as a Rack response:
[ status, headers, body ]
this method will not return until the response headers are fully parsed, but the body returned will be this Kcar::Response handler itself. It is not guaranteed that trailers will be stored in the returned header
returns a 3-element array that resembles a Rack response, but is more useful for additional processing by other code.
[ status, headers, body ]
Use Kcar::Response#rack if you want to guaranteee a proper Rack response.
this method will not return until the response headers are fully parsed, but the body returned will be this Kcar::Response handler itself. unchunk must be true to guarantee trailers will be stored in the returned header object
Originally generated with the Darkfish Rdoc Generator 2, modified by wrongdoc.