Skip to content

Commit 8d3c7fc

Browse files
takluyverminrk
authored andcommitted
Backport PR #1861: fix 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. Signed-off-by: Min RK <[email protected]>
1 parent 87c8b1a commit 8d3c7fc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

notebook/files/handlers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def get(self, path):
3535

3636
# get mimetype from filename
3737
if name.endswith('.ipynb'):
38-
self.set_header('Content-Type', 'application/json')
38+
self.set_header('Content-Type', 'application/x-ipynb+json')
3939
else:
4040
cur_mime = mimetypes.guess_type(name)[0]
4141
if cur_mime is not None:

0 commit comments

Comments
 (0)