- update of grafics

- check for startsWith("127.") instead of equals("127.0.0.0")

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@4853 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
orbiter 17 years ago
parent 18ad12eceb
commit 0b52ef3e4b

Binary file not shown.

Before

Width:  |  Height:  |  Size: 51 KiB

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 52 KiB

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

After

Width:  |  Height:  |  Size: 27 KiB

@ -198,7 +198,7 @@ public final class httpd implements serverHandler {
this.clientIP = this.userAddress.getHostAddress();
if (this.userAddress.isAnyLocalAddress()) this.clientIP = "localhost";
if (this.clientIP.startsWith("0:0:0:0:0:0:0:1")) this.clientIP = "localhost";
if (this.clientIP.equals("127.0.0.1")) this.clientIP = "localhost";
if (this.clientIP.startsWith("127.")) this.clientIP = "localhost";
final String proxyClient = switchboard.getConfig("proxyClient", "*");
final String serverClient = switchboard.getConfig("serverClient", "*");

@ -115,7 +115,7 @@ public class icapd implements serverHandler {
this.clientIP = this.userAddress.getHostAddress();
if (this.userAddress.isAnyLocalAddress()) this.clientIP = "localhost";
if (this.clientIP.startsWith("0:0:0:0:0:0:0:1")) this.clientIP = "localhost";
if (this.clientIP.equals("127.0.0.1")) this.clientIP = "localhost";
if (this.clientIP.startsWith("127.")) this.clientIP = "localhost";
}
public String greeting() {

@ -201,7 +201,7 @@ public final class serverCore extends serverAbstractBusyThread implements server
}
public static final boolean isLocalhost(String hostname) {
return hostname.equals("localhost") || hostname.equals("127.0.0.1") || hostname.startsWith("0:0:0:0:0:0:0:1");
return hostname.equals("localhost") || hostname.startsWith("127.") || hostname.startsWith("0:0:0:0:0:0:0:1");
}
// class initializer

@ -860,16 +860,16 @@ public class yacySeed {
if (ip == null) return "IP is null";
if (ip.length() < 8) return "IP is too short: " + ip;
if (!natLib.isProper(ip)) return "IP is not proper: " + ip; //this does not work with staticIP
if (ip.equals("localhost") || ip.equals("127.0.0.1") || (ip.startsWith("0:0:0:0:0:0:0:1"))) return "IP for localhost rejected";
if (ip.equals("localhost") || ip.startsWith("127.") || (ip.startsWith("0:0:0:0:0:0:0:1"))) return "IP for localhost rejected";
// seedURL
final String seedURL = this.dna.get(SEEDLIST);
if (seedURL != null && seedURL.length() > 0) {
if (!seedURL.startsWith("http://") && !seedURL.startsWith("http://")) return "wrong protocol for seedURL";
if (!seedURL.startsWith("http://") && !seedURL.startsWith("https://")) return "wrong protocol for seedURL";
try {
URL url = new URL(seedURL);
String host = url.getHost();
if (host.equals("localhost") || host.equals("127.0.0.1") || (host.startsWith("0:0:0:0:0:0:0:1"))) return "seedURL in localhost rejected";
if (host.equals("localhost") || host.startsWith("127.") || (host.startsWith("0:0:0:0:0:0:0:1"))) return "seedURL in localhost rejected";
} catch (MalformedURLException e) {
return "seedURL malformed";
}

@ -762,7 +762,7 @@ public class yacyURL implements Serializable {
// checks for local/global IP range and local IP
public boolean isLocal() {
if (this.hash == null) {
if (this.host.startsWith("0:0:0:0:0:0:0:1") || this.host.equals("127.0.0.1") || this.host.equals("localhost")) return true;
if (this.host.startsWith("0:0:0:0:0:0:0:1") || this.host.startsWith("127.") || this.host.equals("localhost")) return true;
synchronized (this) {
this.hash = urlHashComputation();
}

Loading…
Cancel
Save