]> granicus.if.org Git - python/commitdiff
Yet another patch by Sjoerd Mullender:
authorGuido van Rossum <guido@python.org>
Mon, 15 Mar 1999 16:16:29 +0000 (16:16 +0000)
committerGuido van Rossum <guido@python.org>
Mon, 15 Mar 1999 16:16:29 +0000 (16:16 +0000)
Don't convert URLs to URLs using pathname2url.

Lib/urllib.py

index a4847365e12c60d9ac56efe606984b6777a5517a..c3da7bfe004e926d121662b79fbd8106e269c7a4 100644 (file)
@@ -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