MantisBT: master 54929f3b

Author Committer Branch Timestamp Parent
dregad dregad master 2017-08-02 08:18:18 master 5884ba47
Affected Issues  0012313: Can't open image attachments in browser windows

Fix inline viewing of image attachments

The code extracting the MIME type from the content was incorrect,
assuming that a semi-colon would always be present but it's not always
the case.

This resulted in MIME type being empty, which in turn made the browser
download the file instead of displaying the image inline when the web
server's content disposition header is set to "attachment".

Jan Müller's original patch [1] was replaced by more efficient code.

Fixes 0012313


mod - file_download.php Diff File