mirror of
https://github.com/kennethreitz/requests.git
synced 2026-06-05 22:50:18 +00:00
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:
+1
-1
@@ -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()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user