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

Fetcher does not save a pages Last-Modified value in CrawlDatum

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Not A Problem
    • 1.2
    • None
    • fetcher
    • None

    Description

      I added the following code in the output method just after the If (content !=null) statement.

      String lastModified = metadata.get("Last-Modified");
      if (lastModified !=null && !lastModified.equals("")) {

      try

      { Date lastModifiedDate = DateUtil.parseDate(lastModified); datum.setModifiedTime(lastModifiedDate.getTime()); }

      catch (DateParseException e) {

      }
      }

      I now get 304 for pages that haven't changed when I recrawl. Need to do further testing. Might also need a configuration parameter to turn off this behavior, allowing pages to be forced to be refreshed.

      Attachments

        Activity

          People

            Unassigned Unassigned
            jkemp101 Joe Kemp
            Votes:
            2 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: