Skip to content

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

fix for crawling of mailto-links

orbitereacf95213aad
diff --git a/source/de/anomic/plasma/plasmaSwitchboard.java b/source/de/anomic/plasma/plasmaSwitchboard.java
index 2e20e609b..8dcd7f5c7 100644
--- a/source/de/anomic/plasma/plasmaSwitchboard.java
+++ b/source/de/anomic/plasma/plasmaSwitchboard.java
@@ -1661,6 +1661,8 @@ public final class plasmaSwitchboard extends serverAbstractSwitch<IndexingStack.
// fetching the next hyperlink
nextEntry = i.next();
nextUrl = nextEntry.getKey();
+ String u = nextUrl.toNormalform(true, true);
+ if (!(u.startsWith("http") || u.startsWith("ftp"))) continue;
// enqueue the hyperlink into the pre-notice-url db
crawlStacker.enqueueEntry(new CrawlEntry(
entry.initiator(),
diff --git a/source/de/anomic/yacy/yacyURL.java b/source/de/anomic/yacy/yacyURL.java
index ff669d7b5..aca059217 100644
--- a/source/de/anomic/yacy/yacyURL.java
+++ b/source/de/anomic/yacy/yacyURL.java
@@ -159,6 +159,9 @@ public class yacyURL implements Serializable {
public static yacyURL newURL(final String baseURL, final String relPath) throws MalformedURLException {
if ((baseURL == null) ||
+ (relPath.startsWith("mailto:")) ||
+ (relPath.startsWith("aim:")) ||
+ (relPath.startsWith("icq:")) ||
(relPath.startsWith("http://")) ||
(relPath.startsWith("https://")) ||
(relPath.startsWith("ftp://")) ||
@@ -925,6 +928,8 @@ public class yacyURL implements Serializable {
new String[]{"http://www.anomic.de/home/index.html", "mailto:[email protected]"},
new String[]{null, "news:de.test"},
new String[]{"http://www.anomic.de/home", "news:de.test"},
+ new String[]{null, "mailto:[email protected]"},
+ new String[]{"http://www.anomic.de/home", "mailto:[email protected]"},
new String[]{"http://www.anomic.de/home", "ftp://ftp.anomic.de/src"},
new String[]{null, "ftp://ftp.delegate.org/"},
new String[]{"http://www.anomic.de/home", "ftp://ftp.delegate.org/"},