Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
fixed problem with redirection: redirected URLs had not been tested with the double-check see also: http://forum.yacy-websuche.de/viewtopic.php?f=6&t=348
orbiterc1440d224155
diff --git a/source/de/anomic/plasma/crawler/http/CrawlWorker.java b/source/de/anomic/plasma/crawler/http/CrawlWorker.javaindex d50f41495..d02d044cd 100644--- a/source/de/anomic/plasma/crawler/http/CrawlWorker.java+++ b/source/de/anomic/plasma/crawler/http/CrawlWorker.java@@ -331,9 +331,14 @@ public final class CrawlWorker extends AbstractCrawlWorker {// generating url hashString urlhash = redirectionUrl.hash();- // removing url from loader queue- plasmaCrawlLoader.switchboard.noticeURL.removeByURLHash(urlhash);-+ // check if the url was already indexed+ String dbname = plasmaCrawlLoader.switchboard.urlExists(urlhash);+ if (dbname != null) {+ this.log.logWarning("CRAWLER Redirection of URL=" + this.url.toString() + " ignored. The url appears already in db " + dbname);+ addURLtoErrorDB(plasmaCrawlEURL.DENIED_REDIRECTION_TO_DOUBLE_CONTENT);+ return null;+ }+// retry crawling with new urlthis.url = redirectionUrl;plasmaHTCache.Entry redirectedEntry = load(crawlingRetryCount-1);diff --git a/source/de/anomic/plasma/plasmaCrawlEURL.java b/source/de/anomic/plasma/plasmaCrawlEURL.javaindex 34518df4e..e9763e65a 100644--- a/source/de/anomic/plasma/plasmaCrawlEURL.java+++ b/source/de/anomic/plasma/plasmaCrawlEURL.java@@ -55,6 +55,7 @@ public class plasmaCrawlEURL {public static final String DENIED_UNSUPPORTED_CHARSET = "denied_(unsupported_charset)";public static final String DENIED_REDIRECTION_HEADER_EMPTY = "denied_(redirection_header_empty)";public static final String DENIED_REDIRECTION_COUNTER_EXCEEDED = "denied_(redirection_counter_exceeded)";+ public static final String DENIED_REDIRECTION_TO_DOUBLE_CONTENT = "denied_(redirection_to_double_content)";public static final String DENIED_WRONG_HTTP_STATUSCODE = "denied_(wrong_http_status_code_";public static final String DENIED_CONTENT_DECODING_ERROR = "denied_(content_decoding_error)";public static final String DENIED_FILESIZE_LIMIT_EXCEEDED = "denied_(filesize_limit_exceeded)";