The mime type is determined with mime_content_type and then if the type is text/plain it is checked for the file extension .gmi and .md. This is wrong if the mime magic thinks the file is text/html and it is a .gmi file that contains some html markup.
Not sure exactly how to fix that, probably the extension has to be checked before using mime magic
The mime type is determined with mime_content_type and then if the type is text/plain it is checked for the file extension .gmi and .md. This is wrong if the mime magic thinks the file is text/html and it is a .gmi file that contains some html markup.
Not sure exactly how to fix that, probably the extension has to be checked before using mime magic