You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tika.apache.org by "Torsten Krah (JIRA)" <ji...@apache.org> on 2013/07/19 16:56:49 UTC
[jira] [Created] (TIKA-1148) application/x-msdownload should have
text/plain as super type
Torsten Krah created TIKA-1148:
----------------------------------
Summary: application/x-msdownload should have text/plain as super type
Key: TIKA-1148
URL: https://issues.apache.org/jira/browse/TIKA-1148
Project: Tika
Issue Type: Improvement
Components: mime
Affects Versions: 1.3
Environment: Linux, JDK 1.7
Reporter: Torsten Krah
Priority: Trivial
Using a standard batch file Tika.detect(...) detects from the magic String detector that it is text/plain.
The MimeDetector tells application/x-msdownload.
The instanceOf test fails to detect, that a ".bat" is a "subtype" of "text/plain".
Fixed this as workaround with:
MimeTypes.getDefaultMimeTypes().setSuperType(MimeTypes.getDefaultMimeTypes().forName("application/x-msdownload"), MimeTypes.getDefaultMimeTypes().forName("text/plain").getType());
>From my point of view its a batch file is a text/plain type, so the hint from the extension detector should be accepted and not ignored.
Can this be added to the mimetypes xml?
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira