def _handle_redirects(self, response, **extra):

        response.redirect_chain = []
        while response.status_code in (301, 302, 303, 307):
            url = response['Location']
            scheme, netloc, path, query, fragment = urlsplit(url)

            redirect_chain = response.redirect_chain
            redirect_chain.append((url, response.status_code))

            if scheme:
                extra['wsgi.url_scheme'] = scheme

            # The test client doesn't handle external links,
            # but since the situation is simulated in test_client,
            # we fake things here by ignoring the netloc portion of the
            # redirected URL.
            response = self.get(path, QueryDict(query), follow=False, **extra)
            response.redirect_chain = redirect_chain

            # Prevent loops
            if response.redirect_chain[-1] in response.redirect_chain[0:-1]:
                break
        return response
Starts the channels for this kernel.
dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-1.2/django/test/client.py/Client._handle_redirects--crossover with--dataset/ETHPy150Open ipython/ipython-py3k/IPython/zmq/kernelmanager.py/KernelManager.start_channels