def _handleResponse(self, response, method, uri, headers, redirectCount):
        """
        Handle the response, making another request if it indicates a redirect.
        """
        if response.code in self._redirectResponses:
            if method not in (b'GET', b'HEAD'):
                err = error.PageRedirect(response.code, location=uri)
                raise ResponseFailed([Failure(err)], response)
            return self._handleRedirect(response, method, uri, headers,
                                        redirectCount)
        elif response.code in self._seeOtherResponses:
            return self._handleRedirect(response, b'GET', uri, headers,
                                        redirectCount)
        return response

        Handle the response, making another request if it indicates a redirect.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/web/client.py