mirror of
https://github.com/jupyter/notebook.git
synced 2024-12-27 04:20:22 +08:00
cleanup weird 404
This commit is contained in:
parent
fc4fb92580
commit
821514bd72
@ -400,10 +400,9 @@ class FileFindHandler(web.StaticFileHandler):
|
||||
return
|
||||
|
||||
if os.path.splitext(path)[1] == '.ipynb':
|
||||
raise HTTPError(404, 'HAHA')
|
||||
name = os.path.splitext(os.path.split(path))[0]
|
||||
name = os.path.basename(path)
|
||||
self.set_header('Content-Type', 'application/json')
|
||||
self.set_header('Content-Disposition','attachment; filename="%s.ipynb"' % name)
|
||||
self.set_header('Content-Disposition','attachment; filename="%s"' % name)
|
||||
|
||||
with open(abspath, "rb") as file:
|
||||
data = file.read()
|
||||
|
Loading…
Reference in New Issue
Block a user