diff options
author | Jack Jansen <jack.jansen@cwi.nl> | 2002-09-12 20:14:04 (GMT) |
---|---|---|
committer | Jack Jansen <jack.jansen@cwi.nl> | 2002-09-12 20:14:04 (GMT) |
commit | 4ef1103b7166d5bd09303c8bf0de988c8015fecf (patch) | |
tree | 2c25b8c4c208490ee0ef2ef5f91b93b3d6b584c1 /Lib/urllib.py | |
parent | 3ae2dc5e5ea7521426ce3f34afa18147435ede5c (diff) | |
download | cpython-4ef1103b7166d5bd09303c8bf0de988c8015fecf.zip cpython-4ef1103b7166d5bd09303c8bf0de988c8015fecf.tar.gz cpython-4ef1103b7166d5bd09303c8bf0de988c8015fecf.tar.bz2 |
When testing for localhost/ first map to lower case. Spotted by Skip.
Diffstat (limited to 'Lib/urllib.py')
-rw-r--r-- | Lib/urllib.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/urllib.py b/Lib/urllib.py index 7b39ea9..f098b5d 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) |