##// END OF EJS Templates
cleanup weird 404
MinRK -
Show More
@@ -400,10 +400,9 b' class FileFindHandler(web.StaticFileHandler):'
400 400 return
401 401
402 402 if os.path.splitext(path)[1] == '.ipynb':
403 raise HTTPError(404, 'HAHA')
404 name = os.path.splitext(os.path.split(path))[0]
403 name = os.path.basename(path)
405 404 self.set_header('Content-Type', 'application/json')
406 self.set_header('Content-Disposition','attachment; filename="%s.ipynb"' % name)
405 self.set_header('Content-Disposition','attachment; filename="%s"' % name)
407 406
408 407 with open(abspath, "rb") as file:
409 408 data = file.read()
General Comments 0
You need to be logged in to leave comments. Login now