diff --git a/source/de/anomic/http/server/HTTPDemon.java b/source/de/anomic/http/server/HTTPDemon.java index 84d268fb2..b3d0a598d 100644 --- a/source/de/anomic/http/server/HTTPDemon.java +++ b/source/de/anomic/http/server/HTTPDemon.java @@ -602,7 +602,7 @@ public final class HTTPDemon implements serverHandler, Cloneable { } // setting other connection properties - prop.put(HeaderFramework.CONNECTION_PROP_CLIENTIP, session.userAddress.isAnyLocalAddress() ? "localhost" : session.userAddress.getHostAddress()); + prop.put(HeaderFramework.CONNECTION_PROP_CLIENTIP, session.userAddress.isAnyLocalAddress() || session.userAddress.isLinkLocalAddress() || session.userAddress.isLoopbackAddress() ? "localhost" : session.userAddress.getHostAddress()); prop.put(HeaderFramework.CONNECTION_PROP_METHOD, HeaderFramework.METHOD_CONNECT); prop.put(HeaderFramework.CONNECTION_PROP_PATH, "/"); prop.put(HeaderFramework.CONNECTION_PROP_EXT, ""); diff --git a/source/net/yacy/cora/protocol/Domains.java b/source/net/yacy/cora/protocol/Domains.java index dadeb3005..f32278361 100644 --- a/source/net/yacy/cora/protocol/Domains.java +++ b/source/net/yacy/cora/protocol/Domains.java @@ -885,6 +885,7 @@ public class Domains { "127.0.0.1".equals(host) || "localhost".equals(host) || host.startsWith("0:0:0:0:0:0:0:1") || + host.startsWith("fe80:0:0:0:0:0:0:1") || // used by my mac as localhost host.startsWith("::1/") || "::1".equals(host) ); diff --git a/source/net/yacy/peers/Seed.java b/source/net/yacy/peers/Seed.java index 1f02030a5..1adb3461f 100644 --- a/source/net/yacy/peers/Seed.java +++ b/source/net/yacy/peers/Seed.java @@ -1048,9 +1048,7 @@ public class Seed implements Cloneable, Comparable, Comparator try { final URL url = new URL(seedURL); final String host = url.getHost(); - if ( host.equals("localhost") - || host.startsWith("127.") - || (host.startsWith("0:0:0:0:0:0:0:1")) ) { + if (Domains.isLocalhost(host)) { return "seedURL in localhost rejected"; } } catch ( final MalformedURLException e ) {