summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>2002-09-12 19:47:52 (GMT)
committerJack Jansen <jack.jansen@cwi.nl>2002-09-12 19:47:52 (GMT)
commit3ae2dc5e5ea7521426ce3f34afa18147435ede5c (patch)
tree553e647feee751d31857d4d4facadb065651802e /Lib
parent10c6eda070f3754a40f6ea3cdf8c571bbc27f038 (diff)
downloadcpython-3ae2dc5e5ea7521426ce3f34afa18147435ede5c.zip
cpython-3ae2dc5e5ea7521426ce3f34afa18147435ede5c.tar.gz
cpython-3ae2dc5e5ea7521426ce3f34afa18147435ede5c.tar.bz2
Treat file://localhost/ as local too (same as file:/ and file:///).
Fixes #607789, bugfix candidate.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/urllib.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/urllib.py b/Lib/urllib.py
index 758ab92..7b39ea9 100644
--- a/Lib/urllib.py
+++ b/Lib/urllib.py
@@ -404,7 +404,7 @@ class URLopener:
def open_file(self, url):
"""Use local file or FTP depending on form of URL."""
- if url[:2] == '//' and url[2:3] != '/':
+ if url[:2] == '//' and url[2:3] != '/' and url[2:12] != 'localhost/':
return self.open_ftp(url)
else:
return self.open_local_file(url)