diff options
author | Neal Norwitz <nnorwitz@gmail.com> | 2002-09-25 19:20:12 +0000 |
---|---|---|
committer | Neal Norwitz <nnorwitz@gmail.com> | 2002-09-25 19:20:12 +0000 |
commit | 7dfb6e295b4e4a8a5554debaf93e260c30725f18 (patch) | |
tree | 86f0cc79f2cb6f477e069730b06bbecc89e0109a /Lib/urlparse.py | |
parent | e134158f236b7821ec92aa61cc5fe46e2a77170f (diff) | |
download | cpython-git-7dfb6e295b4e4a8a5554debaf93e260c30725f18.tar.gz |
Fix SF # 591713, Fix "file:" URL to have right no. of /'s, by Bruce Atherton
Add a test too. urljoin() would make file:/tmp/foo instead of file:///tmp/foo
Bugfix candidate, I will backport.
Diffstat (limited to 'Lib/urlparse.py')
-rw-r--r-- | Lib/urlparse.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/urlparse.py b/Lib/urlparse.py index ee99645d59..6361937a93 100644 --- a/Lib/urlparse.py +++ b/Lib/urlparse.py @@ -128,7 +128,7 @@ def urlunparse((scheme, netloc, url, params, query, fragment)): return urlunsplit((scheme, netloc, url, query, fragment)) def urlunsplit((scheme, netloc, url, query, fragment)): - if netloc or (scheme in uses_netloc and url[:2] == '//'): + if netloc or (scheme in uses_netloc and url[:2] != '//'): if url and url[:1] != '/': url = '/' + url url = '//' + (netloc or '') + url if scheme: |