mirror of
https://github.com/python/cpython.git
synced 2025-10-22 06:32:43 +00:00
When testing for localhost/ first map to lower case. Spotted by Skip.
This commit is contained in:
parent
3ae2dc5e5e
commit
4ef1103b71
1 changed files with 1 additions and 1 deletions
|
@ -404,7 +404,7 @@ class URLopener:
|
||||||
|
|
||||||
def open_file(self, url):
|
def open_file(self, url):
|
||||||
"""Use local file or FTP depending on form of 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)
|
return self.open_ftp(url)
|
||||||
else:
|
else:
|
||||||
return self.open_local_file(url)
|
return self.open_local_file(url)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue