tika-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeremias Maerki (JIRA)" <j...@apache.org>
Subject [jira] Created: (TIKA-225) [PATCH] Various bugfixes for MIME detection
Date Fri, 15 May 2009 16:03:45 GMT
[PATCH] Various bugfixes for MIME detection

                 Key: TIKA-225
                 URL: https://issues.apache.org/jira/browse/TIKA-225
             Project: Tika
          Issue Type: Bug
          Components: mime
    Affects Versions: 0.4
            Reporter: Jeremias Maerki
             Fix For: 0.4
         Attachments: detection-bugfixes.diff, test-files.zip

Here's a patch that solves the following issues:
- text/plain's priority is too high. The BOMs are also used by XML so it must be ensured that
text/plain is not found too soon.
- *.xsl, *.xslt and *.xsd are not text/plain but they are actually XML files. XSLT has its
own MIME type.
- Consolidated the two XHTML entries.
- Fixed a bug in the existing XML magics which cause plain XML files to be detected as text/plain.
- Added magics for UTF-16 encoding. (Some magics are still missing: http://www.w3.org/TR/xml/#sec-guessing)
- Added entry for XSLT
- XML namespace detection didn't work if namespace prefixes are used (Examples: XSLT Stylesheets
or SVG graphics). Corrected this by adding an additional detection step that fires up an XML
parser to determine the root element. Of course, this could probably be done without an XML
parser but I had limited time available.
- Added a test case for some files (test files in separate ZIP, to be placed under tika-core\src\test\resources\org\apache\tika\mime)


This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message