Skip to content

armgit / nutch

Public Imported from GitHub
0

Apache Nutch is an extensible and scalable web crawler

Don't create dummy Content (throws NPE), just pass null. Reported by Richard Braman.

Andrzej Bialeckib8c4bea5d3f2
diff --git a/src/plugin/lib-http/src/java/org/apache/nutch/protocol/http/api/HttpBase.java b/src/plugin/lib-http/src/java/org/apache/nutch/protocol/http/api/HttpBase.java
index ea33a78df..6cdd7826a 100644
--- a/src/plugin/lib-http/src/java/org/apache/nutch/protocol/http/api/HttpBase.java
+++ b/src/plugin/lib-http/src/java/org/apache/nutch/protocol/http/api/HttpBase.java
@@ -193,9 +193,7 @@ public abstract class HttpBase implements Protocol {
// skip this page, otherwise the thread would block for too long.
LOGGER.info("Skipping: " + u + " exceeds fetcher.max.crawl.delay, max="
+ (maxCrawlDelay / 1000) + ", Crawl-Delay=" + (delay / 1000));
- Content c = new Content(u.toString(), u.toString(), EMPTY_CONTENT,
- null, null, this.conf);
- return new ProtocolOutput(c, ProtocolStatus.STATUS_WOULDBLOCK);
+ return new ProtocolOutput(null, ProtocolStatus.STATUS_WOULDBLOCK);
}
String host;
try {