When testing for localhost/ first map to lower case. Spotted by Skip.

This commit is contained in:
Jack Jansen 2002-09-12 20:14:04 +00:00
parent 3ae2dc5e5e
commit 4ef1103b71

View file

@ -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] != '/' and url[2:12] != 'localhost/':
if url[:2] == '//' and url[2:3] != '/' and url[2:12].lower() != 'localhost/':
return self.open_ftp(url)
else:
return self.open_local_file(url)