summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1999-03-15 16:16:29 (GMT)
committerGuido van Rossum <guido@python.org>1999-03-15 16:16:29 (GMT)
commit3764595c980ccba821a29947dbef14947b71825e (patch)
tree2a6002cb83fb9e6b031a56d5783b30e5d43bf0cc
parentf03fdbc063fa44703c1e244f7b47314a5e2083c5 (diff)
downloadcpython-3764595c980ccba821a29947dbef14947b71825e.zip
cpython-3764595c980ccba821a29947dbef14947b71825e.tar.gz
cpython-3764595c980ccba821a29947dbef14947b71825e.tar.bz2
Yet another patch by Sjoerd Mullender:
Don't convert URLs to URLs using pathname2url.
-rw-r--r--Lib/urllib.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/urllib.py b/Lib/urllib.py
index a484736..c3da7bf 100644
--- a/Lib/urllib.py
+++ b/Lib/urllib.py
@@ -326,12 +326,12 @@ class URLopener:
host, file = splithost(url)
if not host:
return addinfourl(open(url2pathname(file), 'rb'),
- headers, 'file:'+pathname2url(file))
+ headers, 'file:'+file)
host, port = splitport(host)
if not port \
and socket.gethostbyname(host) in (localhost(), thishost()):
return addinfourl(open(url2pathname(file), 'rb'),
- headers, 'file:'+pathname2url(file))
+ headers, 'file:'+file)
raise IOError, ('local file error', 'not on local host')
# Use FTP protocol