From 9644c186a44d2b8c86cec8686f2405a67a76422a Mon Sep 17 00:00:00 2001 From: Michael Peter Christen Date: Tue, 11 Sep 2012 02:03:14 +0200 Subject: [PATCH] added search functionality to ViewFile.html servlet --- htroot/Crawler_p.java | 5 ++ htroot/ViewFile.html | 63 ++++++++++++++++++- .../anomic/http/server/HTTPDFileHandler.java | 2 +- 3 files changed, 66 insertions(+), 4 deletions(-) diff --git a/htroot/Crawler_p.java b/htroot/Crawler_p.java index 37ae0785a..a7209da1e 100644 --- a/htroot/Crawler_p.java +++ b/htroot/Crawler_p.java @@ -96,6 +96,11 @@ public class Crawler_p { prop.put("info", "0"); + if (post != null) { + String c = post.toString(); + if (c.length() < 1000) Log.logInfo("Crawl Start", c); + } + if (post != null && post.containsKey("continue")) { // continue queue final String queue = post.get("continue", ""); diff --git a/htroot/ViewFile.html b/htroot/ViewFile.html index a44d67c6d..d72d53d3b 100644 --- a/htroot/ViewFile.html +++ b/htroot/ViewFile.html @@ -1,6 +1,59 @@ + YaCy '#[clientname]#': View URL Content #%env/templates/metas.template%# @@ -22,11 +75,15 @@

View URL Content

-
+
Get URL Viewer
-
URL:
 
-
 
+
URL:
+
+ + +
+
diff --git a/source/de/anomic/http/server/HTTPDFileHandler.java b/source/de/anomic/http/server/HTTPDFileHandler.java index 62d330317..0de649e2c 100644 --- a/source/de/anomic/http/server/HTTPDFileHandler.java +++ b/source/de/anomic/http/server/HTTPDFileHandler.java @@ -336,7 +336,7 @@ public final class HTTPDFileHandler { if (!accessGranted) { final boolean accessFromLocalhost = Domains.isLocalhost(clientIP) && (refererHost == null || refererHost.isEmpty() || Domains.isLocalhost(refererHost)); accessGranted = accessFromLocalhost && realmValue != null && realmProp.length() > 6 && (adminAccountBase64MD5.equals(realmValue)); - Log.logInfo("HTTPDFileHandler", "access from localhost blocked, clientIP=" + clientIP); + if (!accessGranted) Log.logInfo("HTTPDFileHandler", "access blocked, clientIP=" + clientIP); } // -5- a password is configured and access comes with matching http-authentify