[Python-checkins] python/dist/src/Lib urllib.py,1.135.6.4,1.135.6.5
rhettinger@users.sourceforge.net
rhettinger@users.sourceforge.net
2002年10月05日 20:24:31 -0700
Update of /cvsroot/python/python/dist/src/Lib
In directory usw-pr-cvs1:/tmp/cvs-serv21959
Modified Files:
Tag: release22-maint
urllib.py
Log Message:
Backport 1.151 and 1.152:
Treat file://localhost/ as local too (same as file:/ and file:///).
Fixes #607789, bugfix candidate.
Index: urllib.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/urllib.py,v
retrieving revision 1.135.6.4
retrieving revision 1.135.6.5
diff -C2 -d -r1.135.6.4 -r1.135.6.5
*** urllib.py 18 Aug 2002 20:10:08 -0000 1.135.6.4
--- urllib.py 6 Oct 2002 03:24:29 -0000 1.135.6.5
***************
*** 400,404 ****
def open_file(self, url):
"""Use local file or FTP depending on form of URL."""
! if url[:2] == '//' and url[2:3] != '/':
return self.open_ftp(url)
else:
--- 400,404 ----
def open_file(self, url):
"""Use local file or FTP depending on form of URL."""
! if url[:2] == '//' and url[2:3] != '/' and url[2:12].lower() != 'localhost/':
return self.open_ftp(url)
else: