You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tika.apache.org by "Nick Burch (JIRA)" <ji...@apache.org> on 2013/07/19 17:08:48 UTC

[jira] [Commented] (TIKA-1148) application/x-msdownload should have text/plain as super type

    [ https://issues.apache.org/jira/browse/TIKA-1148?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13713749#comment-13713749 ] 

Nick Burch commented on TIKA-1148:
----------------------------------

Hmm, I'm not certain that .bat should be in there with exe, com, msi etc

My preference would be to pull .bat out to its own mimetype, which would be quite similar to what we have for text/x-basic or application/x-sh

Are you able to find a good mimetype for us to use for windows (and dos!) .bat files? 

(We'd also want to bring .cmd into the same one, currently .cmd seems to live elsewhere to .bat, which seems incorrect)
                
> 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