From 27031424c666856667b76c439aac2bfe21783572 2013-10-17 21:09:18 From: MinRK Date: 2013-10-17 21:09:18 Subject: [PATCH] cleanup weird 404 --- diff --git a/IPython/html/base/handlers.py b/IPython/html/base/handlers.py index 3375b4a..2565753 100644 --- a/IPython/html/base/handlers.py +++ b/IPython/html/base/handlers.py @@ -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()