You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tika.apache.org by ta...@apache.org on 2023/05/24 21:17:23 UTC

[tika] branch TIKA-3996 created (now 2f99777f1)

This is an automated email from the ASF dual-hosted git repository.

tallison pushed a change to branch TIKA-3996
in repository https://gitbox.apache.org/repos/asf/tika.git


      at 2f99777f1 [TIKA-3996] -- add magic for x-sap

This branch includes the following new commits:

     new 2f99777f1 [TIKA-3996] -- add magic for x-sap

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[tika] 01/01: [TIKA-3996] -- add magic for x-sap

Posted by ta...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

tallison pushed a commit to branch TIKA-3996
in repository https://gitbox.apache.org/repos/asf/tika.git

commit 2f99777f1ffc7964be11b12ffaea23f4ac089e12
Author: tballison <ta...@apache.org>
AuthorDate: Wed May 24 17:17:14 2023 -0400

    [TIKA-3996] -- add magic for x-sap
---
 .../src/main/resources/org/apache/tika/mime/tika-mimetypes.xml   | 9 ++++++++-
 .../src/test/java/org/apache/tika/mime/OneOffMimeTest.java       | 4 ++--
 2 files changed, 10 insertions(+), 3 deletions(-)

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 77b8ff4a9..6cae54699 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
@@ -5339,7 +5339,14 @@
     <glob pattern="*.ogg"/>
     <sub-class-of type="audio/ogg"/>
   </mime-type>
-
+  <mime-type type="audio/x-sap">
+    <_comment>Slight Atari Player</_comment>
+    <tika:link>https://asap.sourceforge.net/sap-format.html</tika:link>
+    <magic priority="50">
+      <match value="SAP\r\n" type="string" offset="0"/>
+    </magic>
+    <glob pattern="*.sap"/>
+  </mime-type>
   <mime-type type="audio/x-oggflac">
     <_comment>Ogg Packaged Free Lossless Audio Codec</_comment>
     <alias type="audio/x-ogg-flac"/>
diff --git a/tika-parsers/tika-parsers-standard/tika-parsers-standard-package/src/test/java/org/apache/tika/mime/OneOffMimeTest.java b/tika-parsers/tika-parsers-standard/tika-parsers-standard-package/src/test/java/org/apache/tika/mime/OneOffMimeTest.java
index 3fbd694db..8f1b628df 100644
--- a/tika-parsers/tika-parsers-standard/tika-parsers-standard-package/src/test/java/org/apache/tika/mime/OneOffMimeTest.java
+++ b/tika-parsers/tika-parsers-standard/tika-parsers-standard-package/src/test/java/org/apache/tika/mime/OneOffMimeTest.java
@@ -40,9 +40,9 @@ public class OneOffMimeTest extends TikaTest {
     @Test
     public void testOne() throws Exception {
         Path p = Paths.get("");
-        String mime = "application/vnd.isac.fcs";
+        String mime = "audio/x-sap";
         assertByData(mime, p);
-        assertByName("application/vnd.isac.fcs", p);
+        assertByName(mime, p);
     }
 
     private void assertByName(String expected, Path p) throws Exception {