From 4ef1103b7166d5bd09303c8bf0de988c8015fecf Mon Sep 17 00:00:00 2001 From: Jack Jansen Date: Thu, 12 Sep 2002 20:14:04 +0000 Subject: [PATCH] When testing for localhost/ first map to lower case. Spotted by Skip. --- Lib/urllib.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/urllib.py b/Lib/urllib.py index 7b39ea91b8..f098b5d0fa 100644 --- a/Lib/urllib.py +++ b/Lib/urllib.py @@ -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) -- 2.50.0