class Async::HTTP::Protocol::HTTP1
A server that supports both HTTP1.0 and HTTP1.1 semantics by detecting the version of the request.
def client(*args)
def client(*args) HTTP11.new(*args) end
def create_handler(version)
def create_handler(version) if klass = HANDLERS[version] klass.server(@stream) else raise RuntimeError, "Unsupported protocol version #{version}" end end
def initialize(stream)
def initialize(stream) super(stream, HTTP11::CRLF) end
def receive_requests(&block)
def receive_requests(&block) method, path, version = self.peek_line.split(/\s+/, 3) create_handler(version).receive_requests(&block) end