Uploaded image for project: 'Nutch'
  1. Nutch
  2. NUTCH-98

RobotRulesParser interprets robots.txt incorrectly

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Won't Fix
    • 0.7
    • None
    • fetcher
    • None

    Description

      Here's a simple example that the current RobotRulesParser gets wrong:

      User-agent: *
      Disallow: /
      Allow: /rss

      The problem is that the isAllowed function takes the first rule that matches and incorrectly decides that URLs starting with "/rss" are Disallowed. The correct algorithm is to take the longest rule that matches. I will attach a patch that fixes this.

      Attachments

        1. RobotRulesParser.java.diff
          0.9 kB
          Jeff Bowden

        Activity

          People

            Unassigned Unassigned
            ruin8r Jeff Bowden
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: