Skip to content

armgit / nutch

Public Imported from GitHub
0

Apache Nutch is an extensible and scalable web crawler

NUTCH-2398: Save content of redirected robots.txt under redirect target URL, do not use original URL (http://example.com/robots.txt) to store both redirect response (HTTP 301) and response of redirect target

Sebastian Nagel620b85df36d0
diff --git a/src/plugin/lib-http/src/java/org/apache/nutch/protocol/http/api/HttpRobotRulesParser.java b/src/plugin/lib-http/src/java/org/apache/nutch/protocol/http/api/HttpRobotRulesParser.java
index 235913907..6e4627cff 100644
--- a/src/plugin/lib-http/src/java/org/apache/nutch/protocol/http/api/HttpRobotRulesParser.java
+++ b/src/plugin/lib-http/src/java/org/apache/nutch/protocol/http/api/HttpRobotRulesParser.java
@@ -147,7 +147,7 @@ public class HttpRobotRulesParser extends RobotRulesParser {
response = ((HttpBase) http).getResponse(redir, new CrawlDatum(),
true);
if (robotsTxtContent != null) {
- addRobotsContent(robotsTxtContent, robotsUrl, response);
+ addRobotsContent(robotsTxtContent, redir, response);
}
}
}