class Async::HTTP::Protocol::HTTP1::Request
def self.read(connection)
def self.read(connection) if parts = connection.read_request self.new(connection, *parts) end end
def connection
def connection @connection end
def hijack!
def hijack! @connection.hijack! end
def hijack?
def hijack? true end
def initialize(connection, authority, method, path, version, headers, body)
def initialize(connection, authority, method, path, version, headers, body) @connection = connection # HTTP/1 requests with an upgrade header (which can contain zero or more values) are extracted into the protocol field of the request, and we expect a response to select one of those protocols with a status code of 101 Switching Protocols. protocol = headers.delete('upgrade') super(nil, authority, method, path, version, headers, body, protocol, self.public_method(:write_interim_response)) end
def write_interim_response(status, headers = nil)
def write_interim_response(status, headers = nil) @connection.write_interim_response(@version, status, headers) end