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

Robots.txt files frequently identified as message/rfc822

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 2.0.0, 1.25, 1.26, 1.27
    • 2.1.0, 1.28
    • mime
    • None

    Description

      The Tika MIME detector recognizes a robots.txt file as "message/rfc822" if the file starts with a "User-Agent" rule and contains also a second rule not too far away from the beginning, e.g.:

      User-Agent: goodbot
      Disallow:
      
      User-Agent: badbot
      Disallow: /
      

      The change 7769a2b requires that two different clauses are matched. However, the two occurrences of "User-Agent:" (initial and after a new line) are treated as different instead of equivalent matches.

      Attachments

        1. robots.txt
          0.1 kB
          Sebastian Nagel

        Activity

          People

            tallison Tim Allison
            snagel Sebastian Nagel
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: