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

PDFParser adds mime-type twice

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 0.3
    • 0.4
    • parser
    • None

    Description

      Using AutoDetectParser to call PDFParser causes the mime-type to be added twice. It should be added exactly once.

      Proposed Fix:
      parser/pdf/PDFParser.java should be changed from:
      metadata.add(Metadata.CONTENT_TYPE, "application/pdf");
      to:
      metadata.set(Metadata.CONTENT_TYPE, "application/pdf");
      as per other Tika bundled parsers.

      Attachments

        1. patch
          0.5 kB
          Jonathan Koren

        Activity

          People

            jukkaz Jukka Zitting
            jonathankoren Jonathan Koren
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: