mirror of
https://github.com/jupyter/notebook.git
synced 2025-01-24 12:05:22 +08:00
Merge pull request #4435 from minrk/tornado-tweaks
raise 404 on not found static file
This commit is contained in:
commit
4e8bc066e9
@ -327,8 +327,8 @@ class FileFindHandler(web.StaticFileHandler):
|
||||
try:
|
||||
abspath = os.path.abspath(filefind(path, roots))
|
||||
except IOError:
|
||||
# empty string should always give exists=False
|
||||
return ''
|
||||
# IOError means not found
|
||||
raise web.HTTPError(404)
|
||||
|
||||
cls._static_paths[path] = abspath
|
||||
return abspath
|
||||
|
Loading…
Reference in New Issue
Block a user