Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
* revert debug change * contains instead of startsWith, because there might me localizied strings * decode punycode for every domainpart seperately (see http://forum.yacy-websuche.de/viewtopic.php?f=9&t=1749)
f1oriaaafe05c0288
diff --git a/source/de/anomic/http/httpdFileHandler.java b/source/de/anomic/http/httpdFileHandler.javaindex 76fbb399a..1b60fe289 100644--- a/source/de/anomic/http/httpdFileHandler.java+++ b/source/de/anomic/http/httpdFileHandler.java@@ -1053,9 +1053,9 @@ public final class httpdFileHandler {} else {if ((errorMsg != null) &&(- errorMsg.startsWith("Broken pipe") ||- errorMsg.startsWith("Connection reset") ||- errorMsg.startsWith("Software caused connection abort")+ errorMsg.contains("broken pipe") ||+ errorMsg.contains("Connection reset") ||+ errorMsg.contains("Software caused connection abort"))) {// client closed the connection, so we just end silentlyerrorMessage.append("Client unexpectedly closed connection while processing query.");diff --git a/source/de/anomic/yacy/yacyURL.java b/source/de/anomic/yacy/yacyURL.javaindex 994abdf53..96c41cdd1 100644--- a/source/de/anomic/yacy/yacyURL.java+++ b/source/de/anomic/yacy/yacyURL.java@@ -124,17 +124,21 @@ public class yacyURL implements Serializable {// handle international domainsif (!Punycode.isBasic(host)) try {- final int d1 = host.lastIndexOf('.');- if (d1 >= 0) {- final String tld = host.substring(d1 + 1);- final String dom = host.substring(0, d1);- final int d0 = dom.lastIndexOf('.');- if (d0 >= 0) {- host = dom.substring(0, d0) + ".xn--" + Punycode.encode(dom.substring(d0 + 1)) + "." + tld;- } else {- host = "xn--" + Punycode.encode(dom) + "." + tld;- }+ final String[] domainParts = host.split("\\.");+ StringBuilder buffer = new StringBuilder();+ // encode each domainpart seperately+ for(int i=0; i<domainParts.length; i++) {+ final String part = domainParts[i];+ if(!Punycode.isBasic(part)) {+ buffer.append("xn--" + Punycode.encode(part));+ } else {+ buffer.append(part);+ }+ if(i != domainParts.length-1) {+ buffer.append('.');+ }}+ host = buffer.toString();} catch (final PunycodeException e) {}}diff --git a/startYACY.sh b/startYACY.shindex f78f2af61..87ff4e2ef 100755--- a/startYACY.sh+++ b/startYACY.sh@@ -166,7 +166,7 @@ fiCLASSPATH=""for N in lib/*.jar; do CLASSPATH="$CLASSPATH$N:"; donefor N in libx/*.jar; do CLASSPATH="$CLASSPATH$N:"; done-CLASSPATH="classes:.:htroot:htroot/api:$CLASSPATH"+CLASSPATH="classes:.:htroot:$CLASSPATH"cmdline="$JAVA $JAVA_ARGS -Djava.awt.headless=true -classpath $CLASSPATH yacy";if [ $DEBUG -eq 1 ] #debug