You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tika.apache.org by ni...@apache.org on 2016/03/24 00:31:54 UTC
[2/2] tika git commit: Remove erroneous backslashes before
already-escaped < entries in vnd.mif mime magic,
plus unit tests. Thanks to Steffen Netz in TIKA-1898 for help with this
Remove erroneous backslashes before already-escaped < entries in vnd.mif mime magic, plus unit tests. Thanks to Steffen Netz in TIKA-1898 for help with this
Project: http://git-wip-us.apache.org/repos/asf/tika/repo
Commit: http://git-wip-us.apache.org/repos/asf/tika/commit/c94236a8
Tree: http://git-wip-us.apache.org/repos/asf/tika/tree/c94236a8
Diff: http://git-wip-us.apache.org/repos/asf/tika/diff/c94236a8
Branch: refs/heads/master
Commit: c94236a8365b9ab1491d98c31819a85b065a9fe1
Parents: 959c9ad
Author: Nick Burch <ni...@gagravarr.org>
Authored: Wed Mar 23 23:31:12 2016 +0000
Committer: Nick Burch <ni...@gagravarr.org>
Committed: Wed Mar 23 23:31:12 2016 +0000
----------------------------------------------------------------------
.../org/apache/tika/mime/tika-mimetypes.xml | 15 +++++++--------
.../java/org/apache/tika/mime/TestMimeTypes.java | 6 ++++++
2 files changed, 13 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/tika/blob/c94236a8/tika-core/src/main/resources/org/apache/tika/mime/tika-mimetypes.xml
----------------------------------------------------------------------
diff --git a/tika-core/src/main/resources/org/apache/tika/mime/tika-mimetypes.xml b/tika-core/src/main/resources/org/apache/tika/mime/tika-mimetypes.xml
index ac3b634..979e0ac 100644
--- a/tika-core/src/main/resources/org/apache/tika/mime/tika-mimetypes.xml
+++ b/tika-core/src/main/resources/org/apache/tika/mime/tika-mimetypes.xml
@@ -1449,14 +1449,13 @@
<alias type="application/x-mif"/>
<alias type="application/x-frame"/>
<magic priority="50">
- <match value="\<MakerFile" type="string" offset="0" />
- <match value="\<MIFFile" type="string" offset="0" />
- <match value="\<MakerDictionary" type="string" offset="0" />
- <match value="\<MakerScreenFont" type="string" offset="0" />
- <match value="\<MML" type="string" offset="0" />
- <match value="\<Book" type="string" offset="0" />
- <match value="\<Maker" type="string" offset="0" />
- <match value="\x3c\x4d\x49\x46\x46\x69\x6c\x65\x20" type="string" offset="0" />
+ <match value="<MakerFile" type="string" offset="0" />
+ <match value="<MIFFile" type="string" offset="0" />
+ <match value="<MakerDictionary" type="string" offset="0" />
+ <match value="<MakerScreenFont" type="string" offset="0" />
+ <match value="<MML" type="string" offset="0" />
+ <match value="<Book" type="string" offset="0" />
+ <match value="<Maker" type="string" offset="0" />
</magic>
<glob pattern="*.mif"/>
</mime-type>
http://git-wip-us.apache.org/repos/asf/tika/blob/c94236a8/tika-parsers/src/test/java/org/apache/tika/mime/TestMimeTypes.java
----------------------------------------------------------------------
diff --git a/tika-parsers/src/test/java/org/apache/tika/mime/TestMimeTypes.java b/tika-parsers/src/test/java/org/apache/tika/mime/TestMimeTypes.java
index 57198ad..ce597fa 100644
--- a/tika-parsers/src/test/java/org/apache/tika/mime/TestMimeTypes.java
+++ b/tika-parsers/src/test/java/org/apache/tika/mime/TestMimeTypes.java
@@ -1001,6 +1001,12 @@ public class TestMimeTypes {
}
@Test
+ public void testMIF() throws Exception {
+ assertType("application/vnd.mif", "testMIF.mif");
+ assertTypeByData("application/vnd.mif", "testMIF.mif");
+ }
+
+ @Test
public void testPKCSSignatures() throws Exception {
// PKCS7 Signed XML files
assertType("application/pkcs7-signature", "testPKCS17Sig.xml.p7m");