mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
commit
284a4a1bb0
2 changed files with 3 additions and 2 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue