You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tika.apache.org by "Tim Allison (JIRA)" <ji...@apache.org> on 2015/04/21 19:04:59 UTC
[jira] [Comment Edited] (TIKA-879) Detection problem:
message/rfc822 file is detected as text/plain.
[ https://issues.apache.org/jira/browse/TIKA-879?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14505269#comment-14505269 ]
Tim Allison edited comment on TIKA-879 at 4/21/15 5:04 PM:
-----------------------------------------------------------
Y, will do. Results probably tomorrow.
This?
<mime-type type="message/rfc822">
<magic priority="50">
<match value="Relay-Version:" type="string" offset="0"/>
<match value="#!\ rnews" type="string" offset="0"/>
<match value="N#!\ rnews" type="string" offset="0"/>
<match value="Forward\ to" type="string" offset="0"/>
<match value="Pipe\ to" type="string" offset="0"/>
<match value="Return-Path:" type="string" offset="0"/>
<match value="\nReturn-Path:" type="string" offset="0:1000"/>
<match value="From:" type="string" offset="0"/>
<match value="Received:" type="string" offset="0"/>
<match value="\nReceived:" type="string" offset="0:1000"/>
<match value="Message-ID:" type="string" offset="0"/>
<match value="\nMessage-ID:" type="string" offset="0:1000"/>
<match value="Date:" type="string" offset="0"/>
</magic>
<glob pattern="*.eml"/>
<glob pattern="*.mime"/>
<glob pattern="*.mht"/>
<glob pattern="*.mhtml"/>
<sub-class-of type="text/plain"/>
</mime-type>
was (Author: tallison@mitre.org):
Y, will do. Results probably tomorrow.
> Detection problem: message/rfc822 file is detected as text/plain.
> -----------------------------------------------------------------
>
> Key: TIKA-879
> URL: https://issues.apache.org/jira/browse/TIKA-879
> Project: Tika
> Issue Type: Bug
> Components: metadata, mime
> Affects Versions: 1.0, 1.1, 1.2
> Environment: linux 3.2.9
> oracle jdk7, openjdk7, sun jdk6
> Reporter: Konstantin Gribov
> Labels: new-parser
> Attachments: TIKA-879-thunderbird.eml
>
>
> When using {{DefaultDetector}} mime type for {{.eml}} files is different (you can test it on {{testRFC822}} and {{testRFC822_base64}} in {{tika-parsers/src/test/resources/test-documents/}}).
> Main reason for such behavior is that only magic detector is really works for such files. Even if you set {{CONTENT_TYPE}} in metadata or some {{.eml}} file name in {{RESOURCE_NAME_KEY}}.
> As I found {{MediaTypeRegistry.isSpecializationOf("message/rfc822", "text/plain")}} returns {{false}}, so detection by {{MimeTypes.detect(...)}} works only by magic.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)