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

Parsers and non-canonical mimetypes

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.9
    • Fix Version/s: 0.10
    • Component/s: parser
    • Labels:
      None

      Description

      As discovered though TIKA-555, we weren't correctly handling the case of non canonical mimetypes properly

      There are three bits to this:

      • The default parser as created by TikaConfig.getDefaultConfig() needs the full mime registry passing in automatically, so it can walk the mime tree. Fixed in r1084801
      • The Composite Parser needs to handle child parsers that declare they support an alias rather than the canonical mimetype. Initial fix in r1084798, Jukka has an idea for a cleaner way
      • When Composite Parser looks for a parser for a mime type, it'll need to canonicalise this before checking. (this isn't a problem for the Auto Detect parser, but can be for others)

      We also probably need a couple more unit tests for this, as TIKA-555 had broken auto detect parsing of bmp (though not direct ImageParser), though none of our tests noticed...

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              nick Nick Burch
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: