Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
*) tested string will appear in input box now (when testing a similar URL it does need to be copied anymore, it can be edited it right away) *) https:// and ftp:// can be used as start of the string to be tested now too *) better error handling (no text in Java anymore)
low0122d01411bbc98
diff --git a/htroot/BlacklistTest_p.html b/htroot/BlacklistTest_p.htmlindex 48eddc8c2..593768596 100644--- a/htroot/BlacklistTest_p.html+++ b/htroot/BlacklistTest_p.html@@ -14,10 +14,11 @@<fieldset><legend>Test list:</legend><form action="BlacklistTest_p.html" method="post" enctype="multipart/form-data">- <input type="text" name="testurl" size="50" value="http://" /> + <input type="text" name="testurl" size="50" value="#[url]#" /> <input type="submit" name="testList" value="Test" />#(testlist)#::+ <br /><br /><div>The tested URL was #[url]#<br>It is blocked for the following cases:<br>@@ -30,6 +31,9 @@#(listedinsurftips)#::<li>Surftips</li>#(/listedinsurftips)#</ul></div>+ ::+ <br /><br />+ <div>The tested URL was not valid.</div>#(/testlist)#</form></fieldset>diff --git a/htroot/BlacklistTest_p.java b/htroot/BlacklistTest_p.javaindex 3e6051be7..606e1ee41 100644--- a/htroot/BlacklistTest_p.java+++ b/htroot/BlacklistTest_p.java@@ -55,12 +55,16 @@ public class BlacklistTest_p {if(post != null && post.containsKey("testList")) {prop.put("testlist", "1");String urlstring = post.get("testurl", "");- if(!urlstring.startsWith("http://")) urlstring = "http://"+urlstring;+ if(!urlstring.startsWith("http://") &&+ !urlstring.startsWith("https://")&&+ !urlstring.startsWith("ftp://")+ ) urlstring = "http://"+urlstring;yacyURL testurl = null;try {testurl = new yacyURL(urlstring, null);} catch (final MalformedURLException e) { testurl = null; }if(testurl != null) {+ prop.putHTML("url",testurl.toString());prop.putHTML("testlist_url",testurl.toString());if(Switchboard.urlBlacklist.isListed(Blacklist.BLACKLIST_CRAWLER, testurl))prop.put("testlist_listedincrawler", "1");@@ -75,7 +79,12 @@ public class BlacklistTest_p {if(Switchboard.urlBlacklist.isListed(Blacklist.BLACKLIST_SURFTIPS, testurl))prop.put("testlist_listedinsurftips", "1");}- else prop.put("testlist_url","not valid");+ else {+ prop.putHTML("url",urlstring);+ prop.put("testlist", "2");+ }+ } else {+ prop.putHTML("url", "http://");}return prop;}