diff options
author | Senthil Kumaran <senthil@uthcode.com> | 2014-07-22 07:16:18 (GMT) |
---|---|---|
committer | Senthil Kumaran <senthil@uthcode.com> | 2014-07-22 07:16:18 (GMT) |
commit | 284a4a1bb0496f24e7c0243bbe9fcca7bfa6b2f0 (patch) | |
tree | f7c042c7e40724f2ec97ab4206b4b362c5d75d7a /Lib/urllib | |
parent | 26408df88fa6d84f0702964cef60e74c7830c066 (diff) | |
parent | bc07ac51801ae261ce09f057cbb4ecf9b7cdc07c (diff) | |
download | cpython-284a4a1bb0496f24e7c0243bbe9fcca7bfa6b2f0.zip cpython-284a4a1bb0496f24e7c0243bbe9fcca7bfa6b2f0.tar.gz cpython-284a4a1bb0496f24e7c0243bbe9fcca7bfa6b2f0.tar.bz2 |
Merge 3.4
Fix localhost checking in FileHandler. Raised in #21970.
Diffstat (limited to 'Lib/urllib')
-rw-r--r-- | Lib/urllib/request.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/urllib/request.py b/Lib/urllib/request.py index 72e91dd..0389f5e 100644 --- a/Lib/urllib/request.py +++ b/Lib/urllib/request.py @@ -1315,7 +1315,7 @@ class FileHandler(BaseHandler): url = req.selector if url[:2] == '//' and url[2:3] != '/' and (req.host and req.host != 'localhost'): - if not req.host is self.get_names(): + if not req.host in self.get_names(): raise URLError("file:// scheme is supported only on localhost") else: return self.open_local_file(req) |