projects
/
services
/
python-requests.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9dc6602
)
url was already parsed, don't urlparse twice
author
Matt Robenolt
<matt@ydekproductions.com>
Mon, 24 Nov 2014 01:54:44 +0000
(17:54 -0800)
committer
Matt Robenolt
<matt@ydekproductions.com>
Mon, 24 Nov 2014 01:54:44 +0000
(17:54 -0800)
requests/sessions.py
patch
|
blob
|
history
diff --git
a/requests/sessions.py
b/requests/sessions.py
index c2f42b1403c99a8bee47be4e8565d62f9fc249b5..4eb374fdb63bc5ea4d2c4d513310dcf582d51f9f 100644
(file)
--- 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)