mirror of
https://github.com/kennethreitz/requests.git
synced 2026-06-05 22:50:18 +00:00
fix usage of compat.urlparse
(this code path appears to have been exercised only by secure cookies)
This commit is contained in:
+3
-3
@@ -31,15 +31,15 @@ class MockRequest(object):
|
||||
self._new_headers = {}
|
||||
|
||||
def get_type(self):
|
||||
return urlparse.urlparse(self._r.full_url).scheme
|
||||
return urlparse(self._r.full_url).scheme
|
||||
|
||||
def get_host(self):
|
||||
return urlparse.urlparse(self._r.full_url).netloc
|
||||
return urlparse(self._r.full_url).netloc
|
||||
|
||||
def get_origin_req_host(self):
|
||||
if self._r.response.history:
|
||||
r = self._r.response.history[0]
|
||||
return urlparse.urlparse(r).netloc
|
||||
return urlparse(r).netloc
|
||||
else:
|
||||
return self.get_host()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user