[ https://issues.apache.org/jira/browse/TIKA-1461?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14188892#comment-14188892 ]
Hudson commented on TIKA-1461: ------------------------------ SUCCESS: Integrated in tika-trunk-jdk1.7 #290 (See [https://builds.apache.org/job/tika-trunk-jdk1.7/290/]) TIKA-1461 PE files must also have the MZ header at the start, so tweak magic and add positive and negative mime magic detection tests for it (nick: http://svn.apache.org/viewvc/tika/trunk/?view=rev&rev=1635263) * /tika/trunk/tika-core/src/main/resources/org/apache/tika/mime/tika-mimetypes.xml * /tika/trunk/tika-parsers/src/test/java/org/apache/tika/mime/TestMimeTypes.java * /tika/trunk/tika-parsers/src/test/resources/test-documents/testJAR_with_PEHDR.jar Very small Windows exe for TIKA-1461, generated with Visual Studio 2008 with advice from http://www.phreedom.org/research/tinype/ (nick: http://svn.apache.org/viewvc/tika/trunk/?view=rev&rev=1635257) * /tika/trunk/tika-parsers/src/test/resources/test-documents/testTinyPE.exe > Bad mime detection of certain JAR file > -------------------------------------- > > Key: TIKA-1461 > URL: https://issues.apache.org/jira/browse/TIKA-1461 > Project: Tika > Issue Type: Bug > Components: core > Affects Versions: 1.6 > Reporter: Cservenak, Tamas > Fix For: 1.7 > > > Given this "ordinary" Java JAR file > https://maven.atlassian.com/content/groups/public/com/atlassian/support/healthcheck/support-healthcheck-plugin/1.0.3/support-healthcheck-plugin-1.0.3.jar > Manually inspected and tested it, it is a Jar file and is valid one. > Still, Tika Core's Detector detects it as type {{application/x-msdownload; > format=pe}}. Tthe detection is "hinted" with file name, hence "jar" hint is > present, still it's not detected as desired {{application/java-archive}}. > IMO, this happens due to the problem with priority of > {{application/x-msdownload; format=pe}}, which is 55. If it would be 50, the > "mediation" would kick in, see TIKA-1292. > Changing/overriding magic priority is not possible using > {{custom-mimetypes.xml}} is also not possible. > Unsure what the correct solution is here, nor how to circumvent this without > patching Tika. > The problem affects versions 1.5 but also 1.6, but we target 1.6. -- This message was sent by Atlassian JIRA (v6.3.4#6332)