@webob.dec.wsgify
    def __call__(self, request):
        base = "http://%s" % request.host
        path = request.path_qs

        if path == "/":
            return "root"

        elif path == "/302":
            url = "%s/success" % base
            raise webob.exc.HTTPFound(location=url)

        elif path == "/302?with_qs=yes":
            url = "%s/success?with_qs=yes" % base
            raise webob.exc.HTTPFound(location=url)

        elif path == "/infinite_302":
            raise webob.exc.HTTPFound(location=request.url)

        elif path.startswith("/redirect-to"):
            url = "http://127.0.0.1:%s/success" % path.split("-")[-1]
            raise webob.exc.HTTPFound(location=url)

        elif path == "/success":
            return "success_from_host_%s" % self.name

        elif path == "/success?with_qs=yes":
            return "success_with_qs"

        return "fail"
Closes the socket.
dataset/ETHPy150Open rcbops/glance-buildpackage/glance/tests/functional/test_client_redirects.py/RedirectTestApp.__call__--crossover with--dataset/ETHPy150Open kuri65536/python-for-android/python-build/python-libs/xmpppy/xmpp/transports.py/TCPsocket.disconnect