mirror of
https://gitlab.com/mbunkus/mkvtoolnix.git
synced 2024-12-29 14:27:42 +00:00
1. MIME type detection: If libmagic returns "application/octet-stream" then try auto-detecting via the file name extension.
2. Added the extension "otf" for OpenType fonts (MIME type the same as TrueType fonts). Fix for bug 242.
This commit is contained in:
parent
819a382277
commit
b3b05e3186
@ -2132,7 +2132,7 @@ const mime_type_t mime_types[] = {
|
||||
{"application/x-troff-man", "man"},
|
||||
{"application/x-troff-me", "me"},
|
||||
{"application/x-troff-ms", "ms"},
|
||||
{"application/x-truetype-font", "ttf"},
|
||||
{"application/x-truetype-font", "ttf otf"},
|
||||
{"application/x-ustar", "ustar"},
|
||||
{"application/x-wais-source", "src"},
|
||||
{"application/x-wingz", "wz"},
|
||||
@ -2653,6 +2653,13 @@ guess_mime_type(string ext,
|
||||
int idx = ret.find(';');
|
||||
if (-1 != idx)
|
||||
ret.erase(idx);
|
||||
|
||||
if (ret == "application/octet-stream")
|
||||
ret = guess_mime_type_by_ext(ext);
|
||||
|
||||
if (ret == "")
|
||||
ret = "application/octet-stream";
|
||||
|
||||
return ret;
|
||||
}
|
||||
#else
|
||||
|
Loading…
Reference in New Issue
Block a user