def request
      raise StateError, "already processing a request" if current_request

      req = @parser.current_request
      @request_fsm.transition :headers
      @keepalive = false if req[CONNECTION] == CLOSE || req.version == HTTP_VERSION_1_0
      @current_request = req

      req
    rescue IOError, Errno::ECONNRESET, Errno::EPIPE
      @request_fsm.transition :closed
      @keepalive = false
      nil
    end
def request
      raise StateError, "already processing a request" if current_request

      req = @parser.current_request
      @request_fsm.transition :headers
      @keepalive = false if req[CONNECTION] == CLOSE || req.version == HTTP_VERSION_1_0
      @current_request = req

      req
    rescue IOError, Errno::ECONNRESET, Errno::EPIPE
      @request_fsm.transition :closed
      @keepalive = false
      nil
    end
Read a request object from the connection