From f793d97e56aec79a7eb8b1f7a6fdf955366d5169 Mon Sep 17 00:00:00 2001 From: luccioman Date: Fri, 13 Jan 2017 16:05:46 +0100 Subject: [PATCH] Factored common code with DigestURL.hosthash() --- htroot/HostBrowser.java | 2 +- htroot/api/webstructure.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/htroot/HostBrowser.java b/htroot/HostBrowser.java index b90b2d8f0..9855d06c0 100644 --- a/htroot/HostBrowser.java +++ b/htroot/HostBrowser.java @@ -331,7 +331,7 @@ public class HostBrowser { prop.putHTML("outbound_host", host); if (authorized) prop.putHTML("outbound_admin_host", host); //used for WebStructurePicture_p link prop.putHTML("inbound_host", host); - String hosthash = ASCII.String(uri.hash(), 6, 6); + String hosthash = uri.hosthash(); String[] pathparts = uri.getPaths(); // get all files for a specific host from the index diff --git a/htroot/api/webstructure.java b/htroot/api/webstructure.java index f43418499..7f1fbdd98 100644 --- a/htroot/api/webstructure.java +++ b/htroot/api/webstructure.java @@ -119,7 +119,7 @@ public class webstructure { try { url = new DigestURL(about.indexOf("://") >= 0 ? about : "http://" + about); // accept also domains urlhash = url.hash(); - hosthash = ASCII.String(urlhash, 6, 6); + hosthash = url.hosthash(); } catch (final MalformedURLException e) { } }