Skip to content

Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance

fix in viewfile needed when ViewFile is called only with 'url' parameter

orbiter38d7a28cd2cb
diff --git a/htroot/ViewFile.java b/htroot/ViewFile.java
index c3c1145af..fcf96d07d 100644
--- a/htroot/ViewFile.java
+++ b/htroot/ViewFile.java
@@ -107,7 +107,7 @@ public class ViewFile {
boolean pre = false;
// get the url hash from which the content should be loaded
- final String urlHash = post.get("urlHash","");
+ String urlHash = post.get("urlHash","");
if (urlHash.length() > 0) {
// get the urlEntry that belongs to the url hash
URIMetadataRow urlEntry = null;
@@ -146,6 +146,7 @@ public class ViewFile {
// define an url by post parameter
url = new DigestURI(urlString, null);
+ urlHash = url.hash();
pre = post.get("pre", "false").equals("true");
} catch (final MalformedURLException e) {}