Skip to content

Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance

patch for bad crawl filter at crawl start

orbitere27aeb7fdce0
diff --git a/htroot/WatchCrawler_p.java b/htroot/WatchCrawler_p.java
index 3358af088..a8f8aa478 100644
--- a/htroot/WatchCrawler_p.java
+++ b/htroot/WatchCrawler_p.java
@@ -102,6 +102,7 @@ public class WatchCrawler_p {
if (fullDomain) try {
newcrawlingfilter = ".*" + (new yacyURL(post.get("crawlingURL",""), null)).getHost() + ".*";
} catch (MalformedURLException e) {}
+ if (newcrawlingfilter.length() < 2) newcrawlingfilter = ".*"; // avoid that all urls are filtered out if bad value was submitted
env.setConfig("crawlingFilter", newcrawlingfilter);
int newcrawlingdepth = Integer.parseInt(post.get("crawlingDepth", "8"));