Send the original response url to `urlparse` rather than the `Response` object. ...
authorig0774 <ig0774@yahoo.com>
Fri, 8 Jun 2012 12:35:54 +0000 (09:35 -0300)
committerig0774 <ig0774@yahoo.com>
Fri, 8 Jun 2012 12:35:54 +0000 (09:35 -0300)
requests/cookies.py

index 85726b065739d439148745fadfd386c1409fe796..041585616088a732e9e94b0b29953c27522ad225 100644 (file)
@@ -39,7 +39,7 @@ class MockRequest(object):
     def get_origin_req_host(self):
         if self._r.response.history:
             r = self._r.response.history[0]
-            return urlparse(r).netloc
+            return urlparse(r.url).netloc
         else:
             return self.get_host()