Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
bugfix to proxy handler: recognize the own yacyh-host
orbitereedcbcd906ea
diff --git a/source/net/yacy/http/AbstractRemoteHandler.java b/source/net/yacy/http/AbstractRemoteHandler.javaindex b4d328cb9..e27be93ee 100644--- a/source/net/yacy/http/AbstractRemoteHandler.java+++ b/source/net/yacy/http/AbstractRemoteHandler.java@@ -82,13 +82,14 @@ abstract public class AbstractRemoteHandler extends AbstractHandler implements H@Overridepublic void handle(String target, Request baseRequest, HttpServletRequest request,HttpServletResponse response) throws IOException, ServletException {-+String host = request.getHeader("Host");if (host == null) return; // no proxy request, continue processing by handlersint hostSplitPos = host.indexOf(':');String hostOnly = hostSplitPos < 0 ? host : host.substring(0, hostSplitPos);-++ if (hostOnly == sb.peers.mySeed().getHexHash() + ".yacyh") return; // bugfix by P. Dahlif (localVirtualHostNames.contains(hostOnly)) return; // no proxy request (quick check), continue processing by handlersif (Domains.isLocal(hostOnly, null)) return; // no proxy, continue processing by handlersif (hostOnly.startsWith(sb.peers.myIP())) { // remote access to my external IP, continue processing by handlers