Uploaded image for project: 'Tika'
  1. Tika
  2. TIKA-2042

MBOX file detected wrongly as text/html

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.13
    • Fix Version/s: 1.14
    • Component/s: None
    • Labels:
      None
    • Environment:

      Ubuntu 14.04, Apache Tika 1.13 and 1.14 nightly at the time of this writing

      Description

      MBOX file doesn't get recognized via "magic detection" mechanism as "application/mbox", but wrongly as "text/html".

      Workaround for this in Tika 1.13 is achieved by placing following in custom-mimetypes.xml, as suggested on mailing list (priority has to be larger than message/rfc822):
      <mime-type type="application/mbox">
      <magic priority="70">
      <match value="From " type="string" offset="0"/>
      </magic>
      <glob pattern="*.mbox"/>
      </mime-type>

      Sample MBOX file is attached.

      1. clojure.mbox
        199 kB
        Vjeran Marcinko

        Issue Links

          Activity

          Hide
          gagravarr Nick Burch added a comment -

          Fixed in 72d2d88b381ba75942ae791042ef54af33ee1f38 - your test file is now detected as mbox even without the filename

          Show
          gagravarr Nick Burch added a comment - Fixed in 72d2d88b381ba75942ae791042ef54af33ee1f38 - your test file is now detected as mbox even without the filename
          Hide
          hudson Hudson added a comment -

          FAILURE: Integrated in tika-2.x #124 (See https://builds.apache.org/job/tika-2.x/124/)
          TIKA-2042 MBOX magic and detection unit test (nick: rev 65cc9bcecdc6b86294a88f3b2b6b26017f356ae5)

          • tika-core/src/main/resources/org/apache/tika/mime/tika-mimetypes.xml
          • tika-app/src/test/java/org/apache/tika/mime/TestMimeTypes.java
          Show
          hudson Hudson added a comment - FAILURE: Integrated in tika-2.x #124 (See https://builds.apache.org/job/tika-2.x/124/ ) TIKA-2042 MBOX magic and detection unit test (nick: rev 65cc9bcecdc6b86294a88f3b2b6b26017f356ae5) tika-core/src/main/resources/org/apache/tika/mime/tika-mimetypes.xml tika-app/src/test/java/org/apache/tika/mime/TestMimeTypes.java
          Hide
          hudson Hudson added a comment -

          FAILURE: Integrated in Tika-trunk #1085 (See https://builds.apache.org/job/Tika-trunk/1085/)
          TIKA-2042 MBOX magic and detection unit test (nick: rev 72d2d88b381ba75942ae791042ef54af33ee1f38)

          • tika-parsers/src/test/java/org/apache/tika/mime/TestMimeTypes.java
          • tika-core/src/main/resources/org/apache/tika/mime/tika-mimetypes.xml
          Show
          hudson Hudson added a comment - FAILURE: Integrated in Tika-trunk #1085 (See https://builds.apache.org/job/Tika-trunk/1085/ ) TIKA-2042 MBOX magic and detection unit test (nick: rev 72d2d88b381ba75942ae791042ef54af33ee1f38) tika-parsers/src/test/java/org/apache/tika/mime/TestMimeTypes.java tika-core/src/main/resources/org/apache/tika/mime/tika-mimetypes.xml
          Hide
          hudson Hudson added a comment -

          FAILURE: Integrated in tika-2.x-windows #28 (See https://builds.apache.org/job/tika-2.x-windows/28/)
          TIKA-2042 MBOX magic and detection unit test (nick: rev 65cc9bcecdc6b86294a88f3b2b6b26017f356ae5)

          • tika-app/src/test/java/org/apache/tika/mime/TestMimeTypes.java
          • tika-core/src/main/resources/org/apache/tika/mime/tika-mimetypes.xml
          Show
          hudson Hudson added a comment - FAILURE: Integrated in tika-2.x-windows #28 (See https://builds.apache.org/job/tika-2.x-windows/28/ ) TIKA-2042 MBOX magic and detection unit test (nick: rev 65cc9bcecdc6b86294a88f3b2b6b26017f356ae5) tika-app/src/test/java/org/apache/tika/mime/TestMimeTypes.java tika-core/src/main/resources/org/apache/tika/mime/tika-mimetypes.xml

            People

            • Assignee:
              Unassigned
              Reporter:
              vjeran@tis.hr Vjeran Marcinko
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development