From 7c81160f456cd5cabf1968df30fae80530cc81c4 Mon Sep 17 00:00:00 2001 From: reger Date: Fri, 7 Oct 2016 03:03:41 +0200 Subject: [PATCH] correct blacklist export as text url to blacklists_p.txt was using servlet for network access and missing network.unit.name fix for http://mantis.tokeek.de/view.php?id=694 + prevent unresoved_pattern in yacy/list servlet --- htroot/BlacklistImpExp_p.html | 2 +- htroot/api/blacklists_p.txt | 4 ++++ htroot/yacy/list.java | 5 ++--- 3 files changed, 7 insertions(+), 4 deletions(-) create mode 100644 htroot/api/blacklists_p.txt diff --git a/htroot/BlacklistImpExp_p.html b/htroot/BlacklistImpExp_p.html index 48ac2558d..58b4ebe71 100644 --- a/htroot/BlacklistImpExp_p.html +++ b/htroot/BlacklistImpExp_p.html @@ -80,7 +80,7 @@ -
+
plain text file: Here you can export a blacklist as a regular text file with one blacklist entry per line. diff --git a/htroot/api/blacklists_p.txt b/htroot/api/blacklists_p.txt new file mode 100644 index 000000000..e19c4f510 --- /dev/null +++ b/htroot/api/blacklists_p.txt @@ -0,0 +1,4 @@ +#{lists}# +#{items}##[item]# +#{/items}# +#{/lists}# \ No newline at end of file diff --git a/htroot/yacy/list.java b/htroot/yacy/list.java index b5c634d11..871e91b55 100644 --- a/htroot/yacy/list.java +++ b/htroot/yacy/list.java @@ -51,6 +51,7 @@ public final class list { // return variable that accumulates replacements final serverObjects prop = new serverObjects(); + prop.put("list", ""); // init a empty return (error case) if ((post == null) || (env == null)) return prop; if (!Protocol.authentifyRequest(post, env)) return prop; @@ -66,7 +67,7 @@ public final class list { if ((sb.isRobinsonMode()) && (!sb.isInMyCluster(otherPeerName))) { // if we are a robinson cluster, answer only if this client is known by our network definition - return null; + return prop; } if (col.equals("black")) { @@ -85,8 +86,6 @@ public final class list { } prop.put("list",out.toString()); - } else { - prop.put("list",""); } return prop;