From: Ben Darnell Date: Mon, 20 Feb 2012 05:37:50 +0000 (-0800) Subject: Revert "Use copy.deepcopy to clone HTTPRequest when following redirects." X-Git-Tag: v2.3.0~83 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2c83f471fb236dc9deaefb04667d1c046018a214;p=thirdparty%2Ftornado.git Revert "Use copy.deepcopy to clone HTTPRequest when following redirects." This reverts commit b7e604646537984e967dd25447a8df3e221bf9ed. Something about this broke the tests. --- diff --git a/tornado/simple_httpclient.py b/tornado/simple_httpclient.py index 26c32d375..aa2bec637 100644 --- a/tornado/simple_httpclient.py +++ b/tornado/simple_httpclient.py @@ -391,7 +391,7 @@ class _HTTPConnection(object): if (self.request.follow_redirects and self.request.max_redirects > 0 and self.code in (301, 302, 303, 307)): - new_request = copy.deepcopy(self.request) + new_request = copy.copy(self.request) new_request.url = urlparse.urljoin(self.request.url, self.headers["Location"]) new_request.max_redirects -= 1