Explicitly delete content-type when mime isn't sure.
Otherwise flask sends text/html by default.
This commit is contained in:
parent
0081dbb40b
commit
4049fd333c
1 changed files with 2 additions and 0 deletions
|
@ -755,6 +755,8 @@ def markdown_flask(core_filename, port, *args, **kwargs):
|
||||||
mime = mimetypes.guess_type(path.absolute_path)[0]
|
mime = mimetypes.guess_type(path.absolute_path)[0]
|
||||||
if mime:
|
if mime:
|
||||||
response.headers['Content-Type'] = mime
|
response.headers['Content-Type'] = mime
|
||||||
|
else:
|
||||||
|
response.headers['Content-Type'] = None
|
||||||
|
|
||||||
return response
|
return response
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue