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.
This commit is contained in:
Min RK 2016-10-31 15:56:11 +01:00
parent 715a6c02db
commit 8daac20e22

View File

@ -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: