diff options
author | Andrey Petrov <andrey.petrov@shazow.net> | 2015-05-03 10:13:08 -0400 |
---|---|---|
committer | Andrey Petrov <andrey.petrov@shazow.net> | 2015-05-03 10:13:08 -0400 |
commit | 8434c77d845255c4002b505c6c2d79c3b35def0d (patch) | |
tree | 0fb3e25171b4426447e0b86a2ab39c84dd786e7f /urllib3/util/url.py | |
parent | 0b744993bbe30fe6e3e4e0c93416412d8e598301 (diff) | |
parent | a91975b77a2e28394859487fe5ebbf4a3a74e634 (diff) | |
download | urllib3-8434c77d845255c4002b505c6c2d79c3b35def0d.tar.gz |
Merging new release version: 1.10.41.10.4
Diffstat (limited to 'urllib3/util/url.py')
-rw-r--r-- | urllib3/util/url.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/urllib3/util/url.py b/urllib3/util/url.py index b2ec834f..e58050cd 100644 --- a/urllib3/util/url.py +++ b/urllib3/util/url.py @@ -15,6 +15,8 @@ class Url(namedtuple('Url', url_attrs)): def __new__(cls, scheme=None, auth=None, host=None, port=None, path=None, query=None, fragment=None): + if path and not path.startswith('/'): + path = '/' + path return super(Url, cls).__new__(cls, scheme, auth, host, port, path, query, fragment) |