class Falcon::Adapters::Output
def self.wrap(status, headers, body)
def self.wrap(status, headers, body) # In no circumstance do we want this header propagating out: if content_length = headers.delete(CONTENT_LENGTH) content_length = Integer(content_length) end if body.is_a?(Async::HTTP::Body::Readable) return body elsif status == 200 and body.respond_to?(:to_path) # Don't mangle partial responsese (206) return Async::HTTP::Body::File.open(body.to_path) else return self.new(headers, body, content_length) end end