Explicitly delete content-type when mime isn't sure.

Otherwise flask sends text/html by default.
This commit is contained in:
voussoir 2021-11-14 16:55:17 -08:00
parent 0081dbb40b
commit 4049fd333c
No known key found for this signature in database
GPG key ID: 5F7554F8C26DACCB

View file

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