Skip to content
Permalink
Browse files

Fixed rendering of crawl queues page for URLs with raw IPV6 addresses

  • Loading branch information...
luccioman committed Aug 13, 2018
1 parent 4ee14ff commit 0efc6c89efc735794be623f7042faa2c7b08c3f8
Showing with 5 additions and 0 deletions.
  1. +5 −0 htroot/IndexCreateQueues_p.java
@@ -13,6 +13,8 @@
import java.util.regex.Pattern;
import java.util.regex.PatternSyntaxException;

import org.apache.http.conn.util.InetAddressUtils;

import net.yacy.cora.date.GenericFormatter;
import net.yacy.cora.document.encoding.ASCII;
import net.yacy.cora.document.id.DigestURL;
@@ -153,6 +155,9 @@ public static serverObjects respond(@SuppressWarnings("unused") final RequestHea
for (Map.Entry<String, Integer[]> host: hosts.entrySet()) {
String hostnameport = host.getKey();
String hostname = Domains.stripToHostName(hostnameport);
if(InetAddressUtils.isIPv6Address(hostname)) {
hostname = "[" + hostname + "]"; // HostBalancer.getDomainStackReferences() function requires square brackets around IPV6 addresses
}
prop.putHTML("crawler_host_" + hc + "_hostnameport", hostnameport);
prop.putHTML("crawler_host_" + hc + "_hostname", hostname);
prop.put("crawler_host_" + hc + "_embed", embed ? 1 : 0);

2 comments on commit 0efc6c8

@234578

This comment has been minimized.

Copy link

replied Aug 13, 2018

Do you also speak German or do I have to try my bad English?

@luccioman

This comment has been minimized.

Copy link
Member Author

replied Aug 14, 2018

Hi @234578 I think it is preferable to speak English on the GitHub project here as this is the language used in code and documentation. And my German is also very bad...

Please sign in to comment.
You can’t perform that action at this time.