def _on_response(self):
        if not self._requests:
            return
        request = self._requests.pop(0)
        response = request.response

        # Do we have Connection: close?
        if not response._keep_alive:
            self._want_close = True
            self._no_process = True
            self._stream.close(False)
            self._stream = None

        # Clear the existing timer.
        if request._timeout_timer:
            request._timeout_timer()

        # Check for a status code handler.
        handler = getattr(response, 'handle_%d' % response.status_code, None)
        if handler:
            response = self._safely_call(handler, self)
            if not response:
                return

        self._safely_call(request.session.on_response, response)
        # Keep processing, if needed.
        self._process()


    ##### Length-Based Responses ##############################################
A response has been completed. Send it on through.
dataset/ETHPy150Open ecdavis/pants/pants/http/client.py/HTTPClient._on_response