raise 404 on not found static file

master gives 403 due to empty string being outside of root
This commit is contained in:
MinRK 2013-10-24 11:04:40 -07:00
parent daf15735bd
commit ff744e25cd

View File

@ -321,8 +321,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