From 4049fd333ce9a461f45b89bf64936d2fcd3f3a39 Mon Sep 17 00:00:00 2001 From: Ethan Dalool Date: Sun, 14 Nov 2021 16:55:17 -0800 Subject: [PATCH] Explicitly delete content-type when mime isn't sure. Otherwise flask sends text/html by default. --- voussoir.net/writing/vmarkdown.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/voussoir.net/writing/vmarkdown.py b/voussoir.net/writing/vmarkdown.py index 6a3d043..321c7ea 100644 --- a/voussoir.net/writing/vmarkdown.py +++ b/voussoir.net/writing/vmarkdown.py @@ -755,6 +755,8 @@ def markdown_flask(core_filename, port, *args, **kwargs): mime = mimetypes.guess_type(path.absolute_path)[0] if mime: response.headers['Content-Type'] = mime + else: + response.headers['Content-Type'] = None return response