def statusReceived(self, status):
        """
        Parse the status line into its components and create a response object
        to keep track of this response's state.
        """
        parts = status.split(b' ', 2)
        if len(parts) == 2:
            # Some broken servers omit the required `phrase` portion of
            # `status-line`.  One such server identified as
            # "cloudflare-nginx".  Others fail to identify themselves
            # entirely.  Fill in an empty phrase for such cases.
            version, codeBytes = parts
            phrase = b""
        elif len(parts) == 3:
            version, codeBytes, phrase = parts
        else:
            raise ParseError(u"wrong number of parts", status)

        try:
            statusCode = int(codeBytes)
        except ValueError:
            raise ParseError(u"non-integer status code", status)

        self.response = Response._construct(
            self.parseVersion(version),
            statusCode,
            phrase,
            self.headers,
            self.transport,
            self.request,
        )

        Parse the status line into its components and create a response object
        to keep track of this response's state.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/web/_newclient.py