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:
1e465fd
)
Fix #1293
author
Ian Cordasco
<graffatcolmingov@gmail.com>
Sat, 6 Apr 2013 15:26:52 +0000
(11:26 -0400)
committer
Ian Cordasco
<graffatcolmingov@gmail.com>
Sat, 6 Apr 2013 15:26:52 +0000
(11:26 -0400)
requests/models.py
patch
|
blob
|
history
diff --git
a/requests/models.py
b/requests/models.py
index
34213f7
..
1052877
100644
(file)
--- a/
requests/models.py
+++ b/
requests/models.py
@@
-284,9
+284,12
@@
class PreparedRequest(RequestEncodingMixin, RequestHooksMixin):
# Support for unicode domain names and paths.
scheme, netloc, path, _params, query, fragment = urlparse(url)
- if not
(scheme and netloc)
:
+ if not
scheme
:
raise MissingSchema("Invalid URL %r: No schema supplied" % url)
+ if not netloc:
+ raise InvalidURL("Invalid URL %t: No netloc supplied" % url)
+
try:
netloc = netloc.encode('idna').decode('utf-8')
except UnicodeError: