Merge pull request #668 from ig0774/patch-1

Send the original response url to `urlparse` rather than the `Response` object
This commit is contained in:
Kenneth Reitz
2012-06-09 04:30:19 -07:00
+1 -1
View 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()