summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--requests/sessions.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/requests/sessions.py b/requests/sessions.py
index c2f42b14..4eb374fd 100644
--- a/requests/sessions.py
+++ b/requests/sessions.py
@@ -129,7 +129,7 @@ class SessionRedirectMixin(object):
# Facilitate relative 'location' headers, as allowed by RFC 7231.
# (e.g. '/path/to/resource' instead of 'http://domain.tld/path/to/resource')
# Compliant with RFC3986, we percent encode the url.
- if not urlparse(url).netloc:
+ if not parsed.netloc:
url = urljoin(resp.url, requote_uri(url))
else:
url = requote_uri(url)