summaryrefslogtreecommitdiffstats
path: root/Lib/urllib/request.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/urllib/request.py')
-rw-r--r--Lib/urllib/request.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/urllib/request.py b/Lib/urllib/request.py
index bc35d8a..18a837d 100644
--- a/Lib/urllib/request.py
+++ b/Lib/urllib/request.py
@@ -1656,6 +1656,10 @@ else:
def url2pathname(pathname):
"""OS-specific conversion from a relative URL of the 'file' scheme
to a file system path; not recommended for general use."""
+ if pathname[:3] == '///':
+ # URL has an empty authority section, so the path begins on the
+ # third character.
+ pathname = pathname[2:]
return unquote(pathname)
def pathname2url(pathname):