def handleResponseEnd(self):
        """
        Finish the original request, indicating that the response has been
        completely written to it, and disconnect the outgoing transport.
        """
        if not self._finished:
            self._finished = True
            self.father.finish()
            self.transport.loseConnection()

        Finish the original request, indicating that the response has been
        completely written to it, and disconnect the outgoing transport.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/web/proxy.py