summaryrefslogtreecommitdiff
path: root/urllib3/util/url.py
diff options
context:
space:
mode:
Diffstat (limited to 'urllib3/util/url.py')
-rw-r--r--urllib3/util/url.py2
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)