You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@nutch.apache.org by "Sebastian Nagel (JIRA)" <ji...@apache.org> on 2018/10/13 11:40:00 UTC
[jira] [Commented] (NUTCH-2606) MIME detection is wrong for
plain-text documents send as Content-Type "application/msword"
[ https://issues.apache.org/jira/browse/NUTCH-2606?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16648893#comment-16648893 ]
Sebastian Nagel commented on NUTCH-2606:
----------------------------------------
The debugger brought the stupid reason to the light: a detected type {{text/plain}} is ignored and hence cannot overwrite a wrong type sent by the server, see [MimeUtil, line 203|https://github.com/apache/nutch/blob/2c69694/src/java/org/apache/nutch/util/MimeUtil.java#L203]. This logic has been added with NUTCH-767 because "the type for empty content is auto-detected as "text/plain" and this value overrides the hint from the Content-Type header". That's not the case anymore: Empty documents are not detected as {{text/plain}} by Tika, except they're named with the extension {{.txt}}.
> MIME detection is wrong for plain-text documents send as Content-Type "application/msword"
> ------------------------------------------------------------------------------------------
>
> Key: NUTCH-2606
> URL: https://issues.apache.org/jira/browse/NUTCH-2606
> Project: Nutch
> Issue Type: Bug
> Affects Versions: 1.14
> Reporter: Sebastian Nagel
> Priority: Minor
> Fix For: 1.16
>
>
> Plain-text documents send as Content-Type "application/msword" are tried to parse as Word documents. The MIME detection should be fixed, so that these are correctly identified as plain-text documents. See NUTCH-2603 and https://www.atnf.csiro.au/computing/software/gipsy/doc/update.doc
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)