Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
".yacy" has its own directory; glad new year :)
borg-030069f65210e220
diff --git a/source/de/anomic/plasma/plasmaHTCache.java b/source/de/anomic/plasma/plasmaHTCache.javaindex f8807ba06..b48a6b5e9 100644--- a/source/de/anomic/plasma/plasmaHTCache.java+++ b/source/de/anomic/plasma/plasmaHTCache.java@@ -498,21 +498,25 @@ public final class plasmaHTCache {matcher.reset(remotePath);}- remotePath = remotePath.replaceAll("[?&:]", "_"); // yes this is not reversible, but that is not needed+ remotePath = remotePath.replaceAll("[?&:!]", "_"); // yes this is not reversible, but that is not needed// only set NO default portsint port = url.getPort();+ String protocol = url.getProtocol();if (port >= 0) {- if ((port == 80 && url.getProtocol().equalsIgnoreCase("http" )) ||- (port == 443 && url.getProtocol().equalsIgnoreCase("https")) ||- (port == 21 && url.getProtocol().equalsIgnoreCase("ftp" ))) {+ if ((port == 80 && protocol.equalsIgnoreCase("http" )) ||+ (port == 443 && protocol.equalsIgnoreCase("https")) ||+ (port == 21 && protocol.equalsIgnoreCase("ftp" ))) {port = -1;}}+ if (url.getHost().toLowerCase().endsWith(".yacy")) {+ protocol = "yacy";+ }if (port < 0) {- return new File(this.cachePath, url.getProtocol() + "/" + url.getHost() + remotePath);+ return new File(this.cachePath, protocol + "/" + url.getHost() + remotePath);} else {- return new File(this.cachePath, url.getProtocol() + "/" + url.getHost() + "!" + port + remotePath);+ return new File(this.cachePath, protocol + "/" + url.getHost() + "!" + port + remotePath);}/* File path;if (port < 0) {@@ -550,6 +554,9 @@ public final class plasmaHTCache {} else if (s.startsWith("ftp/")) {protocol = "ftp://";s = s.substring(4);+ } else if (s.startsWith("yacy/")) {+ protocol = "http://";+ s = s.substring(5);} else {return null;}@@ -728,7 +735,7 @@ public final class plasmaHTCache {// check status codeif (!(this.responseStatus.startsWith("200") ||- this.responseStatus.startsWith("203"))) { return "bad_status_" + this.responseStatus.substring(0,3); }+ this.responseStatus.startsWith("203"))) { return "bad_status_" + this.responseStatus.substring(0,3); }// check storage location// sometimes a file name is equal to a path name in the same directory;