From 3057a0b939960de6eda4eb11099e8a7b78824edd Mon Sep 17 00:00:00 2001 From: orbiter Date: Wed, 29 Sep 2010 22:44:49 +0000 Subject: [PATCH] - intranet scanner now produces urls with host names, not ips if possible - CrawStartIntranet servlet shows IPs and host names git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@7210 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- htroot/CrawlStartIntranet_p.html | 2 ++ htroot/CrawlStartIntranet_p.java | 2 ++ source/net/yacy/cora/protocol/Scanner.java | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/htroot/CrawlStartIntranet_p.html b/htroot/CrawlStartIntranet_p.html index b17853a2c..f1faa9b61 100644 --- a/htroot/CrawlStartIntranet_p.html +++ b/htroot/CrawlStartIntranet_p.html @@ -41,12 +41,14 @@ + #{list}# + #(process)#::#(/process)# diff --git a/htroot/CrawlStartIntranet_p.java b/htroot/CrawlStartIntranet_p.java index c52de868d..c89bd8b84 100644 --- a/htroot/CrawlStartIntranet_p.java +++ b/htroot/CrawlStartIntranet_p.java @@ -24,6 +24,7 @@ import java.util.Iterator; import java.util.Map; import net.yacy.cora.document.MultiProtocolURI; +import net.yacy.cora.protocol.Domains; import net.yacy.cora.protocol.RequestHeader; import net.yacy.cora.protocol.Scanner; import net.yacy.kelondro.blob.Tables; @@ -90,6 +91,7 @@ public class CrawlStartIntranet_p { urlString = url.toNormalform(true, false); prop.put("servertable_list_" + i + "_pk", new String(url.hash())); prop.put("servertable_list_" + i + "_count", i); + prop.putHTML("servertable_list_" + i + "_ip", Domains.dnsResolve(url.getHost()).getHostAddress()); prop.putHTML("servertable_list_" + i + "_url", urlString); prop.put("servertable_list_" + i + "_process", inIndex(sb, urlString) == null ? 0 : 1); i++; diff --git a/source/net/yacy/cora/protocol/Scanner.java b/source/net/yacy/cora/protocol/Scanner.java index ced8aabad..d37088f4b 100644 --- a/source/net/yacy/cora/protocol/Scanner.java +++ b/source/net/yacy/cora/protocol/Scanner.java @@ -121,7 +121,7 @@ public class Scanner extends Thread { private void addProtocol(String protocol, boolean bigrange) { for (InetAddress i: genlist(bigrange)) { try { - this.scanqueue.put(new MultiProtocolURI(protocol + "://" + i.getHostAddress() + "/")); + this.scanqueue.put(new MultiProtocolURI(protocol + "://" + i.getHostName() + "/")); } catch (MalformedURLException e) { Log.logException(e); } catch (InterruptedException e) {
IP URL Process
#[ip]# #[url]#not in indexindexed