def _parse_request_line(self, line):

        # Parse the first line as the request line.
        # Fail, if unable to parse.

        request_line = _read_request_line_dict(line)
        if not request_line:
            return

        # Parse the URI.
        uri = urlparse(request_line["uri"])

        # Copy from the parsed URI.
        if uri.scheme:
            self.request.protocol = uri.scheme
        if uri.netloc:
            # Sometimes urlparse leave the port in the netloc.
            if ":" in uri.netloc:
                (self.request.host, self.request.port) = uri.netloc.split(":")
            else:
                self.request.host = uri.netloc
        if uri.port:
            self.request.port = uri.port
        if uri.path:
            self.request.path = uri.path
        if uri.query:
            query = parse_qs(uri.query)
            for key in query:
                self.request.query[key] = query[key]

        # Read the method from the request line. Default is GET.
        if request_line in "method":
            self.request.method = request_line["method"]
dataset/ETHPy150Open pjdietz/rester-sublime-http-client/rester/parse.py/RequestParser._parse_request_line/swapped operands of `in`