From 8daac20e22782024abde7d86a19e0fdbe4e443c0 Mon Sep 17 00:00:00 2001 From: Min RK Date: Mon, 31 Oct 2016 15:56:11 +0100 Subject: [PATCH] set notebook mime-type on download links notebooks are not application/json, they are application/x-ipynb+json. This fixes Safari adding the JSON extension to notebooks on download. --- notebook/files/handlers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/notebook/files/handlers.py b/notebook/files/handlers.py index 1f02dd8d6..c54151125 100644 --- a/notebook/files/handlers.py +++ b/notebook/files/handlers.py @@ -43,7 +43,7 @@ class FilesHandler(IPythonHandler): # get mimetype from filename if name.endswith('.ipynb'): - self.set_header('Content-Type', 'application/json') + self.set_header('Content-Type', 'application/x-ipynb+json') else: cur_mime = mimetypes.guess_type(name)[0] if cur_mime is not None: