summaryrefslogtreecommitdiffstats
path: root/Lib/urlparse.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/urlparse.py')
-rw-r--r--Lib/urlparse.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/urlparse.py b/Lib/urlparse.py
index 698b726..4552e6e 100644
--- a/Lib/urlparse.py
+++ b/Lib/urlparse.py
@@ -112,9 +112,9 @@ def urlparse(url, scheme = '', allow_fragments = 1):
# had redundant delimiters, e.g. a ? with an empty query (the draft
# states that these are equivalent).
def urlunparse((scheme, netloc, url, params, query, fragment)):
- if netloc:
+ if netloc or (scheme in uses_netloc and url[:2] == '//'):
if url[:1] != '/': url = '/' + url
- url = '//' + netloc + url
+ url = '//' + (netloc or '') + url
if scheme:
url = scheme + ':' + url
if params: