class Rack::Chunked
def call(env)
but does not have content-length or transfer-encoding headers,
If the rack app returns a response that should have a body,
def call(env) status, headers, body = response = @app.call(env) if chunkable_version?(env[SERVER_PROTOCOL]) && !STATUS_WITH_NO_ENTITY_BODY.key?(status.to_i) && !headers[CONTENT_LENGTH] && !headers[TRANSFER_ENCODING] headers[TRANSFER_ENCODING] = 'chunked' if headers['trailer'] response[2] = TrailerBody.new(body) else response[2] = Body.new(body) end end response end