Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
*)cleanup access static methods and fields
hydroxcb69047b917f
diff --git a/htroot/IndexCreateIndexingQueue_p.java b/htroot/IndexCreateIndexingQueue_p.javaindex 2ab050663..0aa20dc85 100644--- a/htroot/IndexCreateIndexingQueue_p.java+++ b/htroot/IndexCreateIndexingQueue_p.java@@ -70,7 +70,6 @@ public class IndexCreateIndexingQueue_p {public static serverObjects respond(httpHeader header, serverObjects post, serverSwitch env) {// return variable that accumulates replacementsplasmaSwitchboard switchboard = (plasmaSwitchboard) env;- wikiCode wikiTransformer = new wikiCode(switchboard);serverObjects prop = new serverObjects();prop.put("rejected", 0);int showRejectedCount = 10;@@ -149,11 +148,11 @@ public class IndexCreateIndexingQueue_p {if ((pcentry != null)&&(pcentry.url() != null)) {initiator = yacyCore.seedDB.getConnected(pcentry.initiator());prop.put("indexing-queue_list_"+entryCount+"_dark", (inProcess)? 2: ((dark) ? 1 : 0));- prop.put("indexing-queue_list_"+entryCount+"_initiator", ((initiator == null) ? "proxy" : wikiTransformer.replaceHTML(initiator.getName())));+ prop.put("indexing-queue_list_"+entryCount+"_initiator", ((initiator == null) ? "proxy" : wikiCode.replaceHTML(initiator.getName())));prop.put("indexing-queue_list_"+entryCount+"_depth", pcentry.depth());prop.put("indexing-queue_list_"+entryCount+"_modified", (pcentry.responseHeader() == null) ? "" : daydate(pcentry.responseHeader().lastModified()));prop.put("indexing-queue_list_"+entryCount+"_anchor", (pcentry.anchorName()==null)?"":pcentry.anchorName());- prop.put("indexing-queue_list_"+entryCount+"_url", wikiTransformer.replaceHTML(pcentry.normalizedURLString()));+ prop.put("indexing-queue_list_"+entryCount+"_url", wikiCode.replaceHTML(pcentry.normalizedURLString()));prop.put("indexing-queue_list_"+entryCount+"_size", bytesToString(entrySize));prop.put("indexing-queue_list_"+entryCount+"_inProcess", (inProcess)?1:0);prop.put("indexing-queue_list_"+entryCount+"_inProcess_hash", pcentry.urlHash());@@ -192,9 +191,9 @@ public class IndexCreateIndexingQueue_p {url = entry.url().toString();initiatorSeed = yacyCore.seedDB.getConnected(initiatorHash);executorSeed = yacyCore.seedDB.getConnected(executorHash);- prop.put("rejected_list_"+j+"_initiator", ((initiatorSeed == null) ? "proxy" : wikiTransformer.replaceHTML(initiatorSeed.getName())));- prop.put("rejected_list_"+j+"_executor", ((executorSeed == null) ? "proxy" : wikiTransformer.replaceHTML(executorSeed.getName())));- prop.put("rejected_list_"+j+"_url", wikiTransformer.replaceHTML(url));+ prop.put("rejected_list_"+j+"_initiator", ((initiatorSeed == null) ? "proxy" : wikiCode.replaceHTML(initiatorSeed.getName())));+ prop.put("rejected_list_"+j+"_executor", ((executorSeed == null) ? "proxy" : wikiCode.replaceHTML(executorSeed.getName())));+ prop.put("rejected_list_"+j+"_url", wikiCode.replaceHTML(url));prop.put("rejected_list_"+j+"_failreason", entry.failreason());prop.put("rejected_list_"+j+"_dark", ((dark) ? 1 : 0));dark = !dark;diff --git a/htroot/IndexCreateLoaderQueue_p.java b/htroot/IndexCreateLoaderQueue_p.javaindex 9e61790f7..c7db406d1 100644--- a/htroot/IndexCreateLoaderQueue_p.java+++ b/htroot/IndexCreateLoaderQueue_p.java@@ -67,7 +67,6 @@ public class IndexCreateLoaderQueue_p {public static serverObjects respond(httpHeader header, serverObjects post, serverSwitch env) {// return variable that accumulates replacementsplasmaSwitchboard switchboard = (plasmaSwitchboard) env;- wikiCode wikiTransformer = new wikiCode(switchboard);serverObjects prop = new serverObjects();@@ -90,9 +89,9 @@ public class IndexCreateLoaderQueue_p {initiator = yacyCore.seedDB.getConnected(theMsg.initiator);prop.put("loader-set_list_"+count+"_dark", ((dark) ? 1 : 0) );- prop.put("loader-set_list_"+count+"_initiator", ((initiator == null) ? "proxy" : wikiTransformer.replaceHTML(initiator.getName())) );+ prop.put("loader-set_list_"+count+"_initiator", ((initiator == null) ? "proxy" : wikiCode.replaceHTML(initiator.getName())) );prop.put("loader-set_list_"+count+"_depth", theMsg.depth );- prop.put("loader-set_list_"+count+"_url", wikiTransformer.replaceHTML(theMsg.url.toString())); // null pointer exception here !!! maybe url = null; check reason.+ prop.put("loader-set_list_"+count+"_url", wikiCode.replaceHTML(theMsg.url.toString())); // null pointer exception here !!! maybe url = null; check reason.dark = !dark;count++;}diff --git a/htroot/IndexCreateWWWGlobalQueue_p.java b/htroot/IndexCreateWWWGlobalQueue_p.javaindex d859642ec..88339d46d 100644--- a/htroot/IndexCreateWWWGlobalQueue_p.java+++ b/htroot/IndexCreateWWWGlobalQueue_p.java@@ -67,7 +67,6 @@ public class IndexCreateWWWGlobalQueue_p {public static serverObjects respond(httpHeader header, serverObjects post, serverSwitch env) {// return variable that accumulates replacementsplasmaSwitchboard switchboard = (plasmaSwitchboard) env;- wikiCode wikiTransformer = new wikiCode(switchboard);serverObjects prop = new serverObjects();if (post != null) {@@ -109,12 +108,12 @@ public class IndexCreateWWWGlobalQueue_p {profileHandle = urle.profileHandle();profileEntry = (profileHandle == null) ? null : switchboard.profiles.getEntry(profileHandle);prop.put("crawler-queue_list_"+i+"_dark", ((dark) ? 1 : 0) );- prop.put("crawler-queue_list_"+i+"_initiator", ((initiator == null) ? "proxy" : wikiTransformer.replaceHTML(initiator.getName())) );- prop.put("crawler-queue_list_"+i+"_profile", ((profileEntry == null) ? "unknown" : wikiTransformer.replaceHTML(profileEntry.name())));+ prop.put("crawler-queue_list_"+i+"_initiator", ((initiator == null) ? "proxy" : wikiCode.replaceHTML(initiator.getName())) );+ prop.put("crawler-queue_list_"+i+"_profile", ((profileEntry == null) ? "unknown" : wikiCode.replaceHTML(profileEntry.name())));prop.put("crawler-queue_list_"+i+"_depth", urle.depth());prop.put("crawler-queue_list_"+i+"_modified", daydate(urle.loaddate()) );- prop.put("crawler-queue_list_"+i+"_anchor", wikiTransformer.replaceHTML(urle.name()));- prop.put("crawler-queue_list_"+i+"_url", wikiTransformer.replaceHTML(urle.url().toString()));+ prop.put("crawler-queue_list_"+i+"_anchor", wikiCode.replaceHTML(urle.name()));+ prop.put("crawler-queue_list_"+i+"_url", wikiCode.replaceHTML(urle.url().toString()));dark = !dark;}}diff --git a/htroot/IndexCreateWWWLocalQueue_p.java b/htroot/IndexCreateWWWLocalQueue_p.javaindex c6612c04f..39c447d3f 100644--- a/htroot/IndexCreateWWWLocalQueue_p.java+++ b/htroot/IndexCreateWWWLocalQueue_p.java@@ -67,7 +67,6 @@ public class IndexCreateWWWLocalQueue_p {public static serverObjects respond(httpHeader header, serverObjects post, serverSwitch env) {// return variable that accumulates replacementsplasmaSwitchboard switchboard = (plasmaSwitchboard) env;- wikiCode wikiTransformer = new wikiCode(switchboard);serverObjects prop = new serverObjects();if (post != null) {@@ -107,12 +106,12 @@ public class IndexCreateWWWLocalQueue_p {profileHandle = urle.profileHandle();profileEntry = (profileHandle == null) ? null : switchboard.profiles.getEntry(profileHandle);prop.put("crawler-queue_list_"+showNum+"_dark", ((dark) ? 1 : 0) );- prop.put("crawler-queue_list_"+showNum+"_initiator", ((initiator == null) ? "proxy" : wikiTransformer.replaceHTML(initiator.getName())) );+ prop.put("crawler-queue_list_"+showNum+"_initiator", ((initiator == null) ? "proxy" : wikiCode.replaceHTML(initiator.getName())) );prop.put("crawler-queue_list_"+showNum+"_profile", ((profileEntry == null) ? "unknown" : profileEntry.name()));prop.put("crawler-queue_list_"+showNum+"_depth", urle.depth());prop.put("crawler-queue_list_"+showNum+"_modified", daydate(urle.loaddate()) );- prop.put("crawler-queue_list_"+showNum+"_anchor", wikiTransformer.replaceHTML(urle.name()));- prop.put("crawler-queue_list_"+showNum+"_url", wikiTransformer.replaceHTML(urle.url().toString()));+ prop.put("crawler-queue_list_"+showNum+"_anchor", wikiCode.replaceHTML(urle.name()));+ prop.put("crawler-queue_list_"+showNum+"_url", wikiCode.replaceHTML(urle.url().toString()));prop.put("crawler-queue_list_"+showNum+"_hash", urle.hash());dark = !dark;showNum++;diff --git a/htroot/IndexCreate_p.java b/htroot/IndexCreate_p.javaindex 804b08def..312fc07d3 100644--- a/htroot/IndexCreate_p.java+++ b/htroot/IndexCreate_p.java@@ -84,7 +84,6 @@ public class IndexCreate_p {public static serverObjects respond(httpHeader header, serverObjects post, serverSwitch env) {// return variable that accumulates replacementsplasmaSwitchboard switchboard = (plasmaSwitchboard) env;- wikiCode wikiTransformer = new wikiCode(switchboard);serverObjects prop = new serverObjects();prop.put("error", 0);@@ -183,7 +182,7 @@ public class IndexCreate_p {} else {prop.put("error", 5); //Crawling failed- prop.put("error_crawlingURL", wikiTransformer.replaceHTML(((String) post.get("crawlingURL"))));+ prop.put("error_crawlingURL", wikiCode.replaceHTML(((String) post.get("crawlingURL"))));prop.put("error_reasonString", reasonString);switchboard.urlPool.errorURL.newEntry(crawlingStartURL, null, yacyCore.seedDB.mySeed.hash, yacyCore.seedDB.mySeed.hash,@@ -359,9 +358,9 @@ public class IndexCreate_p {profile = (plasmaCrawlProfile.entry) it.next();//table += profile.map().toString() + "<br>";prop.put("crawlProfiles_"+count+"_dark", ((dark) ? 1 : 0));- prop.put("crawlProfiles_"+count+"_name", wikiTransformer.replaceHTML(profile.name()));- prop.put("crawlProfiles_"+count+"_startURL", wikiTransformer.replaceHTML(profile.startURL()));- prop.put("crawlProfiles_"+count+"_handle", wikiTransformer.replaceHTML(profile.handle()));+ prop.put("crawlProfiles_"+count+"_name", wikiCode.replaceHTML(profile.name()));+ prop.put("crawlProfiles_"+count+"_startURL", wikiCode.replaceHTML(profile.startURL()));+ prop.put("crawlProfiles_"+count+"_handle", wikiCode.replaceHTML(profile.handle()));prop.put("crawlProfiles_"+count+"_depth", profile.generalDepth());prop.put("crawlProfiles_"+count+"_filter", profile.generalFilter());prop.put("crawlProfiles_"+count+"_withQuery", ((profile.crawlingQ()) ? 1 : 0));@@ -391,9 +390,9 @@ public class IndexCreate_p {if (peer == null) peername = record.originator(); else peername = peer.getName();prop.put("otherCrawlStartInProgress_" + showedCrawl + "_dark", ((dark) ? 1 : 0));prop.put("otherCrawlStartInProgress_" + showedCrawl + "_cre", record.created());- prop.put("otherCrawlStartInProgress_" + showedCrawl + "_peername", wikiTransformer.replaceHTML(peername));- prop.put("otherCrawlStartInProgress_" + showedCrawl + "_startURL", wikiTransformer.replaceHTML(record.attributes().get("startURL").toString()));- prop.put("otherCrawlStartInProgress_" + showedCrawl + "_intention", wikiTransformer.replaceHTML(record.attributes().get("intention").toString()));+ prop.put("otherCrawlStartInProgress_" + showedCrawl + "_peername", wikiCode.replaceHTML(peername));+ prop.put("otherCrawlStartInProgress_" + showedCrawl + "_startURL", wikiCode.replaceHTML(record.attributes().get("startURL").toString()));+ prop.put("otherCrawlStartInProgress_" + showedCrawl + "_intention", wikiCode.replaceHTML(record.attributes().get("intention").toString()));prop.put("otherCrawlStartInProgress_" + showedCrawl + "_generalDepth", record.attributes().get("generalDepth"));prop.put("otherCrawlStartInProgress_" + showedCrawl + "_crawlingQ", (record.attributes().get("crawlingQ").equals("true")) ? 1 : 0);showedCrawl++;@@ -416,9 +415,9 @@ public class IndexCreate_p {if (peer == null) peername = record.originator(); else peername = peer.getName();prop.put("otherCrawlStartFinished_" + showedCrawl + "_dark", ((dark) ? 1 : 0));prop.put("otherCrawlStartFinished_" + showedCrawl + "_cre", record.created());- prop.put("otherCrawlStartFinished_" + showedCrawl + "_peername", wikiTransformer.replaceHTML(peername));- prop.put("otherCrawlStartFinished_" + showedCrawl + "_startURL", wikiTransformer.replaceHTML(record.attributes().get("startURL").toString()));- prop.put("otherCrawlStartFinished_" + showedCrawl + "_intention", wikiTransformer.replaceHTML(record.attributes().get("intention").toString()));+ prop.put("otherCrawlStartFinished_" + showedCrawl + "_peername", wikiCode.replaceHTML(peername));+ prop.put("otherCrawlStartFinished_" + showedCrawl + "_startURL", wikiCode.replaceHTML(record.attributes().get("startURL").toString()));+ prop.put("otherCrawlStartFinished_" + showedCrawl + "_intention", wikiCode.replaceHTML(record.attributes().get("intention").toString()));prop.put("otherCrawlStartFinished_" + showedCrawl + "_generalDepth", record.attributes().get("generalDepth"));prop.put("otherCrawlStartFinished_" + showedCrawl + "_crawlingQ", (record.attributes().get("crawlingQ").equals("true")) ? 1 : 0);showedCrawl++;diff --git a/htroot/News.java b/htroot/News.javaindex ff3d7ef58..aca05a114 100644--- a/htroot/News.java+++ b/htroot/News.java@@ -60,7 +60,6 @@ public class News {public static serverObjects respond(httpHeader header, serverObjects post, serverSwitch env) {plasmaSwitchboard switchboard = (plasmaSwitchboard) env;- wikiCode wikiTransformer = new wikiCode(switchboard);serverObjects prop = new serverObjects();boolean overview = (post == null) || (((String) post.get("page", "0")).equals("0"));int tableID = (overview) ? -1 : Integer.parseInt((String) post.get("page", "0")) - 1;@@ -142,7 +141,7 @@ public class News {prop.put("table_list_" + i + "_cat", record.category());prop.put("table_list_" + i + "_rec", (record.received() == null) ? "-" : yacyCore.universalDateShortString(record.received()));prop.put("table_list_" + i + "_dis", record.distributed());- prop.put("table_list_" + i + "_att", wikiTransformer.replaceHTML(record.attributes().toString()) );+ prop.put("table_list_" + i + "_att", wikiCode.replaceHTML(record.attributes().toString()) );} catch (IOException e) {e.printStackTrace();}prop.put("table_list", maxCount);}diff --git a/htroot/PerformanceMemory_p.java b/htroot/PerformanceMemory_p.javaindex 394831ec7..eec852e1a 100644--- a/htroot/PerformanceMemory_p.java+++ b/htroot/PerformanceMemory_p.java@@ -193,9 +193,9 @@ public class PerformanceMemory_p {slt = yacyCore.newsPool.dbCacheFillStatus();putprop(prop, env, "News", set);- req = sb.robots.size();- chk = sb.robots.dbCacheChunkSize();- slt = sb.robots.dbCacheFillStatus();+ req = plasmaSwitchboard.robots.size();+ chk = plasmaSwitchboard.robots.dbCacheChunkSize();+ slt = plasmaSwitchboard.robots.dbCacheFillStatus();putprop(prop, env, "Robots", set);req = sb.profiles.size();diff --git a/htroot/SettingsAck_p.java b/htroot/SettingsAck_p.javaindex 83fc68e4d..8b14d6cf7 100644--- a/htroot/SettingsAck_p.java+++ b/htroot/SettingsAck_p.java@@ -54,6 +54,7 @@ import de.anomic.http.httpHeader;import de.anomic.http.httpRemoteProxyConfig;import de.anomic.http.httpd;import de.anomic.http.httpdProxyHandler;+import de.anomic.plasma.plasmaParser;import de.anomic.plasma.plasmaSwitchboard;import de.anomic.server.serverCodings;import de.anomic.server.serverCore;@@ -116,7 +117,7 @@ public class SettingsAck_p {return prop;}// check passed. set account:- env.setConfig("adminAccountBase64MD5", serverCodings.standardCoder.encodeMD5Hex(serverCodings.standardCoder.encodeBase64String(user + ":" + pw1)));+ env.setConfig("adminAccountBase64MD5", serverCodings.encodeMD5Hex(serverCodings.standardCoder.encodeBase64String(user + ":" + pw1)));env.setConfig("adminAccount", "");prop.put("info", 5);//admin account changedprop.put("info_user", user);@@ -265,7 +266,7 @@ public class SettingsAck_p {if (filter.length() == 0) filter = "*";// check passed. set account:env.setConfig("serverClient", filter);- env.setConfig("serverAccountBase64MD5", serverCodings.standardCoder.encodeMD5Hex(serverCodings.standardCoder.encodeBase64String(user + ":" + pw1)));+ env.setConfig("serverAccountBase64MD5", serverCodings.encodeMD5Hex(serverCodings.standardCoder.encodeBase64String(user + ":" + pw1)));env.setConfig("serverAccount", "");prop.put("info", 8);//server access filter updated@@ -539,10 +540,10 @@ public class SettingsAck_p {String[] enabledMimes = null;if (post.containsKey("allParserEnabled")) {// enable all available parsers- enabledMimes = sb.parser.setEnabledParserList(sb.parser.getAvailableParserList().keySet());+ enabledMimes = plasmaParser.setEnabledParserList(sb.parser.getAvailableParserList().keySet());} else {// activate all received parsers- enabledMimes = sb.parser.setEnabledParserList(post.keySet());+ enabledMimes = plasmaParser.setEnabledParserList(post.keySet());}Arrays.sort(enabledMimes);diff --git a/htroot/ViewProfile.java b/htroot/ViewProfile.javaindex d85db3ae4..e92bd7409 100644--- a/htroot/ViewProfile.java+++ b/htroot/ViewProfile.java@@ -125,7 +125,7 @@ public class ViewProfile {}//else only HTML tags get transformed to regular textelse{- value=wikiTransformer.replaceHTML( ((String)entry.getValue()).replaceAll("\r","").replaceAll("\\\\n","\n") );+ value=wikiCode.replaceHTML( ((String)entry.getValue()).replaceAll("\r","").replaceAll("\\\\n","\n") );}//all known Keys which should be set as they arediff --git a/htroot/htdocsdefault/dir.java b/htroot/htdocsdefault/dir.javaindex a693cb566..28676ae69 100644--- a/htroot/htdocsdefault/dir.java+++ b/htroot/htdocsdefault/dir.java@@ -112,8 +112,6 @@ public class dir {final String uploadAccountBase64MD5 = switchboard.getConfig("uploadAccountBase64MD5", "");final String downloadAccountBase64MD5 = switchboard.getConfig("downloadAccountBase64MD5", "");- final String logoutAccountBase64MD5 = de.anomic.server.serverCodings.encodeMD5Hex(serverCodings.standardCoder.encodeBase64String(":"));-userDB.Entry entry = switchboard.userDB.proxyAuth((String)header.get("Authorization", "xxxxxx"));boolean adminAuthorization, downloadAuthorization, uploadAuthorization;if(entry == null){@@ -158,10 +156,10 @@ public class dir {}}if (action.equals("downloadPassword") && adminAuthorization) {- switchboard.setConfig("downloadAccountBase64MD5", (post.get("password", "").length() == 0) ? "" : serverCodings.standardCoder.encodeMD5Hex(serverCodings.standardCoder.encodeBase64String("download:" + post.get("password", ""))));+ switchboard.setConfig("downloadAccountBase64MD5", (post.get("password", "").length() == 0) ? "" : serverCodings.encodeMD5Hex(serverCodings.standardCoder.encodeBase64String("download:" + post.get("password", ""))));}if (action.equals("uploadPassword") && adminAuthorization) {- switchboard.setConfig("uploadAccountBase64MD5", (post.get("password", "").length() == 0) ? "" : serverCodings.standardCoder.encodeMD5Hex(serverCodings.standardCoder.encodeBase64String("upload:" + post.get("password", ""))));+ switchboard.setConfig("uploadAccountBase64MD5", (post.get("password", "").length() == 0) ? "" : serverCodings.encodeMD5Hex(serverCodings.standardCoder.encodeBase64String("upload:" + post.get("password", ""))));}if (action.equals("upload") && (uploadAuthorization || adminAuthorization)) {String filename = new File(post.get("file", "dummy")).getName();diff --git a/htroot/sharedBlacklist_p.java b/htroot/sharedBlacklist_p.javaindex 89e1ddfdc..901a92ec1 100644--- a/htroot/sharedBlacklist_p.java+++ b/htroot/sharedBlacklist_p.java@@ -243,8 +243,8 @@ public class sharedBlacklist_p {out += newItem+"\n";prop.put("status_list_"+count+"_entry", newItem);count++;- if (switchboard.urlBlacklist != null)- switchboard.urlBlacklist.add(newItem.substring(0, pos), newItem.substring(pos + 1));+ if (plasmaSwitchboard.urlBlacklist != null)+ plasmaSwitchboard.urlBlacklist.add(newItem.substring(0, pos), newItem.substring(pos + 1));//write the listtry{diff --git a/htroot/xml/queues/indexing_p.java b/htroot/xml/queues/indexing_p.javaindex ed21ce0fd..fb4fc0bfc 100644--- a/htroot/xml/queues/indexing_p.java+++ b/htroot/xml/queues/indexing_p.java@@ -105,11 +105,11 @@ public class indexing_p {totalSize += entrySize;if ((pcentry != null)&&(pcentry.url() != null)) {initiator = yacyCore.seedDB.getConnected(pcentry.initiator());- prop.put("list_"+i+"_initiator", ((initiator == null) ? "proxy" : wikiTransformer.replaceHTML(initiator.getName())));+ prop.put("list_"+i+"_initiator", ((initiator == null) ? "proxy" : wikiCode.replaceHTML(initiator.getName())));prop.put("list_"+i+"_depth", pcentry.depth());prop.put("list_"+i+"_modified", (pcentry.responseHeader() == null) ? "" : daydate(pcentry.responseHeader().lastModified()));- prop.put("list_"+i+"_anchor", (pcentry.anchorName()==null)?"":wikiTransformer.replaceHTML(pcentry.anchorName()));- prop.put("list_"+i+"_url", wikiTransformer.replaceHTML(pcentry.normalizedURLString()));+ prop.put("list_"+i+"_anchor", (pcentry.anchorName()==null)?"":wikiCode.replaceHTML(pcentry.anchorName()));+ prop.put("list_"+i+"_url", wikiCode.replaceHTML(pcentry.normalizedURLString()));prop.put("list_"+i+"_size", entrySize);prop.put("list_"+i+"_inProcess", (inProcess)?1:0);prop.put("list_"+i+"_hash", pcentry.urlHash());diff --git a/source/de/anomic/http/httpd.java b/source/de/anomic/http/httpd.javaindex b6427d54c..1d161bb0e 100644--- a/source/de/anomic/http/httpd.java+++ b/source/de/anomic/http/httpd.java@@ -390,7 +390,7 @@ public final class httpd implements serverHandler {: httpHeader.readHeader(this.prop,this.session);// handling transparent proxy support- header.handleTransparentProxySupport(header, this.prop, virtualHost, httpdProxyHandler.isTransparentProxy);+ httpHeader.handleTransparentProxySupport(header, this.prop, virtualHost, httpdProxyHandler.isTransparentProxy);// determines if the connection should be kept alivehandlePersistentConnection(header);@@ -407,7 +407,7 @@ public final class httpd implements serverHandler {try {Class soapHandlerClass = Class.forName("de.anomic.soap.httpdSoapHandler");Constructor classConstructor = soapHandlerClass.getConstructor( new Class[] { serverSwitch.class } );- soapHandler = (httpdHandler) classConstructor.newInstance(new Object[] { this.switchboard });+ soapHandler = (httpdHandler) classConstructor.newInstance(new Object[] { switchboard });} catch (Exception e) {sendRespondHeader(this.prop,this.session.out,httpVersion,503,null);return serverCore.TERMINATE_CONNECTION;@@ -426,7 +426,7 @@ public final class httpd implements serverHandler {*/} else {if (this.handleServerAuthentication(header)) {- if (fileHandler == null) fileHandler = new httpdFileHandler(this.switchboard);+ if (fileHandler == null) fileHandler = new httpdFileHandler(switchboard);fileHandler.doGet(this.prop, header, this.session.out);}}@@ -439,7 +439,7 @@ public final class httpd implements serverHandler {// pass to proxyif (this.allowProxy) {if (this.handleProxyAuthentication(header)) {- if (proxyHandler != null) proxyHandler = new httpdProxyHandler(this.switchboard);+ if (proxyHandler != null) proxyHandler = new httpdProxyHandler(switchboard);proxyHandler.doGet(this.prop, header, this.session.out);}} else {@@ -489,7 +489,7 @@ public final class httpd implements serverHandler {else header = httpHeader.readHeader(this.prop,this.session);// handle transparent proxy support- header.handleTransparentProxySupport(header, this.prop, virtualHost, httpdProxyHandler.isTransparentProxy);+ httpHeader.handleTransparentProxySupport(header, this.prop, virtualHost, httpdProxyHandler.isTransparentProxy);// determines if the connection should be kept aliveboolean persistent = handlePersistentConnection(header);@@ -499,7 +499,7 @@ public final class httpd implements serverHandler {// pass to serverif (allowServer) {if (handleServerAuthentication(header)) {- if (fileHandler == null) fileHandler = new httpdFileHandler(this.switchboard);+ if (fileHandler == null) fileHandler = new httpdFileHandler(switchboard);fileHandler.doHead(prop, header, this.session.out);}} else {@@ -512,7 +512,7 @@ public final class httpd implements serverHandler {// pass to proxyif (allowProxy) {if (handleProxyAuthentication(header)) {- if (proxyHandler != null) proxyHandler = new httpdProxyHandler(this.switchboard);+ if (proxyHandler != null) proxyHandler = new httpdProxyHandler(switchboard);proxyHandler.doHead(prop, header, this.session.out);}} else {@@ -542,7 +542,7 @@ public final class httpd implements serverHandler {else header = httpHeader.readHeader(this.prop,this.session);// handle transparent proxy support- header.handleTransparentProxySupport(header, this.prop, virtualHost, httpdProxyHandler.isTransparentProxy);+ httpHeader.handleTransparentProxySupport(header, this.prop, virtualHost, httpdProxyHandler.isTransparentProxy);// determines if the connection should be kept aliveboolean persistent = handlePersistentConnection(header);@@ -565,7 +565,7 @@ public final class httpd implements serverHandler {Constructor soapHandlerConstructor = soapHandlerClass.getConstructor( new Class[] { serverSwitch.class } );// creating the new object- soapHandler = (httpdHandler)soapHandlerConstructor.newInstance( new Object[] { this.switchboard } );+ soapHandler = (httpdHandler)soapHandlerConstructor.newInstance( new Object[] { switchboard } );} catch (Exception e) {sendRespondHeader(this.prop,this.session.out,httpVersion,503,null);return serverCore.TERMINATE_CONNECTION;@@ -583,7 +583,7 @@ public final class httpd implements serverHandler {*/} else {if (handleServerAuthentication(header)) {- if (fileHandler == null) fileHandler = new httpdFileHandler(this.switchboard);+ if (fileHandler == null) fileHandler = new httpdFileHandler(switchboard);fileHandler.doPost(prop, header, this.session.out, this.session.in);}}@@ -596,7 +596,7 @@ public final class httpd implements serverHandler {// pass to proxyif (allowProxy) {if (handleProxyAuthentication(header)) {- if (proxyHandler != null) proxyHandler = new httpdProxyHandler(this.switchboard);+ if (proxyHandler != null) proxyHandler = new httpdProxyHandler(switchboard);proxyHandler.doPost(prop, header, this.session.out, this.session.in);}} else {@@ -665,7 +665,7 @@ public final class httpd implements serverHandler {// pass to proxyif (allowProxy) {if (handleProxyAuthentication(header)) {- if (proxyHandler != null) proxyHandler = new httpdProxyHandler(this.switchboard);+ if (proxyHandler != null) proxyHandler = new httpdProxyHandler(switchboard);proxyHandler.doConnect(prop, header, this.session.in, this.session.out);}} else {@@ -952,7 +952,7 @@ public final class httpd implements serverHandler {}public Object clone() {- return new httpd(this.switchboard, new httpdFileHandler(this.switchboard), new httpdProxyHandler(this.switchboard));+ return new httpd(switchboard, new httpdFileHandler(switchboard), new httpdProxyHandler(switchboard));}public static final void sendRespondBody(diff --git a/source/de/anomic/http/httpdFileHandler.java b/source/de/anomic/http/httpdFileHandler.javaindex 7ec3f8e5e..1129faa8c 100644--- a/source/de/anomic/http/httpdFileHandler.java+++ b/source/de/anomic/http/httpdFileHandler.java@@ -317,7 +317,7 @@ public final class httpdFileHandler extends httpdAbstractHandler implements httpreturn;} else {userDB.Entry entry = sb.userDB.proxyAuth(authorization);- if (adminAccountBase64MD5.equals(serverCodings.standardCoder.encodeMD5Hex(authorization.trim().substring(6)))) {+ if (adminAccountBase64MD5.equals(serverCodings.encodeMD5Hex(authorization.trim().substring(6)))) {// Authentication successfull. remove brute-force flagserverCore.bfHost.remove(conProp.getProperty("CLIENTIP"));}else if(entry != null && entry.hasAdminRight()){@@ -343,7 +343,7 @@ public final class httpdFileHandler extends httpdAbstractHandler implements http// handle bfHost in case we have authentified correctlyif ((authorization != null) &&(adminAccountBase64MD5.length() != 0) &&- (adminAccountBase64MD5.equals(serverCodings.standardCoder.encodeMD5Hex(authorization.trim().substring(6))))) {+ (adminAccountBase64MD5.equals(serverCodings.encodeMD5Hex(authorization.trim().substring(6))))) {// remove brute-force flagserverCore.bfHost.remove(conProp.getProperty(httpHeader.CONNECTION_PROP_CLIENTIP));}diff --git a/source/de/anomic/plasma/parser/tar/tarParser.java b/source/de/anomic/plasma/parser/tar/tarParser.javaindex dc227bce2..71dafb99f 100644--- a/source/de/anomic/plasma/parser/tar/tarParser.java+++ b/source/de/anomic/plasma/parser/tar/tarParser.java@@ -118,7 +118,7 @@ public class tarParser extends AbstractParser implements Parser {String entryExt = (idx > -1) ? entryName.substring(idx+1) : null;// trying to determine the mimeType per file extension- String entryMime = theParser.getMimeTypeByFileExt(entryExt);+ String entryMime = plasmaParser.getMimeTypeByFileExt(entryExt);// getting the entry contentByteArrayOutputStream bos = new ByteArrayOutputStream();diff --git a/source/de/anomic/plasma/parser/zip/zipParser.java b/source/de/anomic/plasma/parser/zip/zipParser.javaindex bbf5ad927..124cc30a3 100644--- a/source/de/anomic/plasma/parser/zip/zipParser.java+++ b/source/de/anomic/plasma/parser/zip/zipParser.java@@ -116,7 +116,7 @@ public class zipParser extends AbstractParser implements Parser {String entryExt = (idx > -1) ? entryName.substring(idx+1) : null;// trying to determine the mimeType per file extension- String entryMime = theParser.getMimeTypeByFileExt(entryExt);+ String entryMime = plasmaParser.getMimeTypeByFileExt(entryExt);// getting the entry contentByteArrayOutputStream bos = new ByteArrayOutputStream();diff --git a/source/de/anomic/plasma/plasmaParser.java b/source/de/anomic/plasma/plasmaParser.javaindex dca38557d..b0a602fc5 100644--- a/source/de/anomic/plasma/plasmaParser.java+++ b/source/de/anomic/plasma/plasmaParser.java@@ -516,13 +516,13 @@ public final class plasmaParser {public void close() {// clearing the parser list- synchronized (this.enabledParserList) {- this.enabledParserList.clear();+ synchronized (enabledParserList) {+ enabledParserList.clear();}// closing the parser object pooltry {- this.theParserPool.close();+ theParserPool.close();} catch (Exception e) { }}@@ -712,8 +712,8 @@ public final class plasmaParser {File in = new File(args[0]);//File out = new File(args[1]);plasmaParser theParser = new plasmaParser();- theParser.initRealtimeParsableMimeTypes("application/xhtml+xml,text/html,text/plain");- theParser.initParseableMimeTypes("application/atom+xml,application/gzip,application/java-archive,application/msword,application/octet-stream,application/pdf,application/rdf+xml,application/rss+xml,application/rtf,application/x-gzip,application/x-tar,application/xml,application/zip,text/rss,text/rtf,text/xml,application/x-bzip2,application/postscript");+ plasmaParser.initRealtimeParsableMimeTypes("application/xhtml+xml,text/html,text/plain");+ plasmaParser.initParseableMimeTypes("application/atom+xml,application/gzip,application/java-archive,application/msword,application/octet-stream,application/pdf,application/rdf+xml,application/rss+xml,application/rtf,application/x-gzip,application/x-tar,application/xml,application/zip,text/rss,text/rtf,text/xml,application/x-bzip2,application/postscript");FileInputStream theInput = new FileInputStream(in);ByteArrayOutputStream theOutput = new ByteArrayOutputStream();serverFileUtils.copy(theInput, theOutput);diff --git a/source/de/anomic/plasma/plasmaSwitchboard.java b/source/de/anomic/plasma/plasmaSwitchboard.javaindex 9bedd45f7..32c23002c 100644--- a/source/de/anomic/plasma/plasmaSwitchboard.java+++ b/source/de/anomic/plasma/plasmaSwitchboard.java@@ -325,9 +325,9 @@ public final class plasmaSwitchboard extends serverAbstractSwitch implements ser// loading the robots.txt dbthis.log.logConfig("Initializing robots.txt DB");File robotsDBFile = new File(this.plasmaPath, "crawlRobotsTxt.db");- this.robots = new plasmaCrawlRobotsTxt(robotsDBFile, ramRobots);+ robots = new plasmaCrawlRobotsTxt(robotsDBFile, ramRobots);this.log.logConfig("Loaded robots.txt DB from file " + robotsDBFile.getName() +- ", " + this.robots.size() + " entries" ++ ", " + robots.size() + " entries" +", " + ppRamString(robotsDBFile.length()/1024));// start indexing management@@ -461,7 +461,7 @@ public final class plasmaSwitchboard extends serverAbstractSwitch implements serthis.yc = new yacyCore(this);//log.logSystem("Started YaCy Protocol Core");System.gc(); try{Thread.currentThread().sleep(5000);} catch (InterruptedException e) {} // for profiler- serverInstantThread.oneTimeJob(yc, "loadSeeds", yc.log, 3000);+ serverInstantThread.oneTimeJob(yc, "loadSeeds", yacyCore.log, 3000);// initializing the stackCrawlThreadthis.sbStackCrawlThread = new plasmaCrawlStacker(this,this.plasmaPath,ramPreNURL);@@ -1326,7 +1326,7 @@ public final class plasmaSwitchboard extends serverAbstractSwitch implements ser// explicit delete/free resourcesif ((entry != null) && (entry.profile() != null) && (!(entry.profile().storeHTCache()))) {- cacheManager.filesInUse.remove(entry.cacheFile());+ plasmaHTCache.filesInUse.remove(entry.cacheFile());cacheManager.deleteFile(entry.url());}entry = null;@@ -1735,7 +1735,7 @@ public final class plasmaSwitchboard extends serverAbstractSwitch implements serString authorization = ((String) header.get(httpHeader.AUTHORIZATION, "xxxxxx")).trim().substring(6);if (authorization.length() == 0) return 1; // no authentication information givenif ((((String) header.get("CLIENTIP", "")).equals("localhost")) && (adminAccountBase64MD5.equals(authorization))) return 3; // soft-authenticated for localhost- if (adminAccountBase64MD5.equals(serverCodings.standardCoder.encodeMD5Hex(authorization))) return 4; // hard-authenticated, all ok+ if (adminAccountBase64MD5.equals(serverCodings.encodeMD5Hex(authorization))) return 4; // hard-authenticated, all okuserDB.Entry entry = this.userDB.proxyAuth((String)header.get(httpHeader.AUTHORIZATION, "xxxxxx"));if(entry.hasAdminRight())return 4;diff --git a/source/de/anomic/yacy/yacyCore.java b/source/de/anomic/yacy/yacyCore.javaindex e14730307..4c0f3f0d1 100644--- a/source/de/anomic/yacy/yacyCore.java+++ b/source/de/anomic/yacy/yacyCore.java@@ -217,7 +217,7 @@ public class yacyCore {}public boolean online() {- this.onlineMode = Integer.parseInt(switchboard.getConfig("onlineMode", "1"));+ onlineMode = Integer.parseInt(switchboard.getConfig("onlineMode", "1"));return ((onlineMode == 2) || ((System.currentTimeMillis() - lastOnlineTime) < 10000));}