Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
*) Removed base tag from errror page. This has been added by myself a long time ago as a workaround for some weird behavior of my router, but as it turns out, it does more bad than good in general: If HTTPS is used for communication with YaCy, entering a wrong passwort led to an errror page with a form which would send username and password unencrypted with the user possibly being unaware of this. *) changed some comments, added some annotations, added SVN properties here and there
low012f65bfaa9af1b
diff --git a/htroot/proxymsg/error.html b/htroot/proxymsg/error.htmlindex 3dfee954b..496e149d3 100644--- a/htroot/proxymsg/error.html+++ b/htroot/proxymsg/error.html@@ -1,7 +1,6 @@<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head>- <base href="http://#[extAddress]#" /><title>YaCy: Error Message</title>#%env/templates/metas.template%#</head>diff --git a/source/de/anomic/crawler/retrieval/FTPLoader.java b/source/de/anomic/crawler/retrieval/FTPLoader.javaindex 85c917337..d3ee175d6 100644--- a/source/de/anomic/crawler/retrieval/FTPLoader.java+++ b/source/de/anomic/crawler/retrieval/FTPLoader.java@@ -1,4 +1,4 @@-// CrawlerWorker.java+// FTPLoader.java// -------------------------------------// part of YACY// (C) by Michael Peter Christen; [email protected]diff --git a/source/de/anomic/crawler/retrieval/HTTPLoader.java b/source/de/anomic/crawler/retrieval/HTTPLoader.javaindex 1d42f6f0e..090504bc2 100644--- a/source/de/anomic/crawler/retrieval/HTTPLoader.java+++ b/source/de/anomic/crawler/retrieval/HTTPLoader.java@@ -1,13 +1,13 @@-//plasmaCrawlWorker.java+//HTTPLoader.java//------------------------//part of YaCy//(C) by Michael Peter Christen; [email protected]//first published on http://www.anomic.de//Frankfurt, Germany, 2006//-// $LastChangedDate: 2006-08-12 16:28:14 +0200 (Sa, 12 Aug 2006) $-// $LastChangedRevision: 2397 $-// $LastChangedBy: theli $+// $LastChangedDate$+// $LastChangedRevision$+// $LastChangedBy$////This program is free software; you can redistribute it and/or modify//it under the terms of the GNU General Public License as published bydiff --git a/source/de/anomic/crawler/retrieval/LoaderDispatcher.java b/source/de/anomic/crawler/retrieval/LoaderDispatcher.javaindex f02f2582f..fa1f7d1da 100644--- a/source/de/anomic/crawler/retrieval/LoaderDispatcher.java+++ b/source/de/anomic/crawler/retrieval/LoaderDispatcher.java@@ -4,9 +4,9 @@//// This is a part of YaCy, a peer-to-peer based web search engine//-// $LastChangedDate: 2006-04-02 22:40:07 +0200 (So, 02 Apr 2006) $-// $LastChangedRevision: 1986 $-// $LastChangedBy: orbiter $+// $LastChangedDate$+// $LastChangedRevision$+// $LastChangedBy$//// LICENSE//diff --git a/source/de/anomic/crawler/retrieval/Request.java b/source/de/anomic/crawler/retrieval/Request.javaindex 1da638b8a..495dbdf12 100755--- a/source/de/anomic/crawler/retrieval/Request.java+++ b/source/de/anomic/crawler/retrieval/Request.java@@ -4,9 +4,9 @@//// This is a part of YaCy, a peer-to-peer based web search engine//-// $LastChangedDate: 2006-04-02 22:40:07 +0200 (So, 02 Apr 2006) $-// $LastChangedRevision: 1986 $-// $LastChangedBy: orbiter $+// $LastChangedDate$+// $LastChangedRevision$+// $LastChangedBy$//// LICENSE//diff --git a/source/de/anomic/crawler/retrieval/Response.java b/source/de/anomic/crawler/retrieval/Response.javaindex 747026e2a..768e176a4 100755--- a/source/de/anomic/crawler/retrieval/Response.java+++ b/source/de/anomic/crawler/retrieval/Response.java@@ -1,12 +1,12 @@-// httpdProxyCacheEntry.java+// Response.java// (C) 2008 by Michael Peter Christen; [email protected], Frankfurt a. M., Germany// first published 19.08.2008 on http://yacy.net//// This is a part of YaCy, a peer-to-peer based web search engine//-// $LastChangedDate: 2006-04-02 22:40:07 +0200 (So, 02 Apr 2006) $-// $LastChangedRevision: 1986 $-// $LastChangedBy: orbiter $+// $LastChangedDate$+// $LastChangedRevision$+// $LastChangedBy$//// LICENSE//diff --git a/source/de/anomic/http/client/EasySSLProtocolSocketFactory.java b/source/de/anomic/http/client/EasySSLProtocolSocketFactory.javaindex 3f6a9940c..f45fce27c 100644--- a/source/de/anomic/http/client/EasySSLProtocolSocketFactory.java+++ b/source/de/anomic/http/client/EasySSLProtocolSocketFactory.java@@ -30,7 +30,7 @@/* CHANGES to original file* ========================- * 2008-04-07 danielr: changed package from org.apache.commons.httpclient.contrib.ssl+ * 2008-04-07 danielr: changed package from org.apache.commons.httpclient.contrib.ssl*/package de.anomic.http.client;diff --git a/source/de/anomic/http/metadata/HeaderFramework.java b/source/de/anomic/http/metadata/HeaderFramework.javaindex 5e037717b..7f5fe2424 100644--- a/source/de/anomic/http/metadata/HeaderFramework.java+++ b/source/de/anomic/http/metadata/HeaderFramework.java@@ -62,7 +62,7 @@ public class HeaderFramework extends TreeMap<String, String> implements Map<Stristatic final String DEFAULT_CHARSET = "ISO-8859-1";- /* =============================================================+ /* =============================================================* Constants defining http versions* ============================================================= */public static final String HTTP_VERSION_0_9 = "HTTP/0.9";@@ -245,6 +245,7 @@ public class HeaderFramework extends TreeMap<String, String> implements Map<Stri// we override the put method to make use of the reverseMappingCache+ @Overridepublic String put(final String key, final String value) {final String upperK = key.toUpperCase();@@ -311,6 +312,7 @@ public class HeaderFramework extends TreeMap<String, String> implements Map<Stri}}+ @Overridepublic String toString() {return super.toString();}diff --git a/source/de/anomic/http/metadata/RequestHeader.java b/source/de/anomic/http/metadata/RequestHeader.javaindex 65fab4b36..d14282ac6 100755--- a/source/de/anomic/http/metadata/RequestHeader.java+++ b/source/de/anomic/http/metadata/RequestHeader.java@@ -4,8 +4,8 @@// first published on http://yacy.net// Frankfurt, Germany, 22.08.2008//-// last major change: $LastChangedDate: 2008-08-20 09:54:56 +0200 (Mi, 20 Aug 2008) $ by $LastChangedBy: danielr $-// Revision: $LastChangedRevision: 5063 $+// last major change: $LastChangedDate$ by $LastChangedBy$+// Revision: $LastChangedRevision$//// This program is free software; you can redistribute it and/or modify// it under the terms of the GNU General Public License as published bydiff --git a/source/de/anomic/http/metadata/ResponseContainer.java b/source/de/anomic/http/metadata/ResponseContainer.javaindex 410df7e39..475f9814b 100644--- a/source/de/anomic/http/metadata/ResponseContainer.java+++ b/source/de/anomic/http/metadata/ResponseContainer.java@@ -4,9 +4,9 @@//// This is a part of YaCy, a peer-to-peer based web search engine//-// $LastChangedDate: 2008-03-14 01:16:04 +0100 (Fr, 14 Mrz 2008) $-// $LastChangedRevision: 4558 $-// $LastChangedBy: orbiter $+// $LastChangedDate$+// $LastChangedRevision$+// $LastChangedBy$//// LICENSE//@@ -181,6 +181,7 @@ public class ResponseContainer {** @see java.lang.Object#finalize()*/+ @Overrideprotected void finalize() {closeStream();}diff --git a/source/de/anomic/http/metadata/ResponseHeader.java b/source/de/anomic/http/metadata/ResponseHeader.javaindex fdeef39b1..f72382c80 100755--- a/source/de/anomic/http/metadata/ResponseHeader.java+++ b/source/de/anomic/http/metadata/ResponseHeader.java@@ -1,11 +1,11 @@-// httpResponseHeader.java+// ResponseHeader.java// -----------------------// (C) 2008 by Michael Peter Christen; [email protected]// first published on http://yacy.net// Frankfurt, Germany, 22.08.2008//-// last major change: $LastChangedDate: 2008-08-20 09:54:56 +0200 (Mi, 20 Aug 2008) $ by $LastChangedBy: danielr $-// Revision: $LastChangedRevision: 5063 $+// last major change: $LastChangedDate$ by $LastChangedBy$+// Revision: $LastChangedRevision$//// This program is free software; you can redistribute it and/or modify// it under the terms of the GNU General Public License as published bydiff --git a/source/de/anomic/http/server/AlternativeDomainNames.java b/source/de/anomic/http/server/AlternativeDomainNames.javaindex aabf80903..83e2a3103 100644--- a/source/de/anomic/http/server/AlternativeDomainNames.java+++ b/source/de/anomic/http/server/AlternativeDomainNames.java@@ -2,9 +2,9 @@// (C) 2008 by Michael Peter Christen; [email protected], Frankfurt a. M., Germany// first published 05.05.2008 on http://yacy.net//-// $LastChangedDate: 2006-04-02 22:40:07 +0200 (So, 02 Apr 2006) $-// $LastChangedRevision: 1986 $-// $LastChangedBy: orbiter $+// $LastChangedDate$+// $LastChangedRevision$+// $LastChangedBy$//// LICENSE//diff --git a/source/de/anomic/http/server/HTTPDFileHandler.java b/source/de/anomic/http/server/HTTPDFileHandler.javaindex 5af56a3aa..1a4e757b6 100644--- a/source/de/anomic/http/server/HTTPDFileHandler.java+++ b/source/de/anomic/http/server/HTTPDFileHandler.java@@ -1,11 +1,12 @@-// httpdFileHandler.java+// HTTPDFileHandler.java// -----------------------// (C) by Michael Peter Christen; [email protected]// first published on http://www.anomic.de// Frankfurt, Germany, 2004, 2005-// last major change: 01.01.2009//-// CGI additions by Marc Nause+// $LastChangedDate$+// $LastChangedRevision$+// $LastChangedBy$//// This program is free software; you can redistribute it and/or modify// it under the terms of the GNU General Public License as published by@@ -142,7 +143,7 @@ public final class HTTPDFileHandler {if (switchboard == null) {switchboard = theSwitchboard;-+if (mimeTable.size() == 0) {// load the mime tablefinal String mimeTablePath = theSwitchboard.getConfig("mimeConfig","");diff --git a/source/de/anomic/http/server/HTTPDProxyHandler.java b/source/de/anomic/http/server/HTTPDProxyHandler.javaindex 4e30f4ef8..67cad0175 100644--- a/source/de/anomic/http/server/HTTPDProxyHandler.java+++ b/source/de/anomic/http/server/HTTPDProxyHandler.java@@ -1,4 +1,4 @@-// httpdProxyHandler.java+// HTTPDProxyHandler.java// (C) 2004 by Michael Peter Christen; [email protected], Frankfurt a. M., Germany// first published 2004 on http://yacy.net//@@ -1327,6 +1327,7 @@ public final class HTTPDProxyHandler {this.socket = socket;}+ @Overridepublic void run() {final byte[] buffer = new byte[512];int len;diff --git a/source/de/anomic/http/server/HTTPDemon.java b/source/de/anomic/http/server/HTTPDemon.javaindex 961de3a1c..f1bcd0a3a 100644--- a/source/de/anomic/http/server/HTTPDemon.java+++ b/source/de/anomic/http/server/HTTPDemon.java@@ -1,4 +1,4 @@-// httpd.java+// HTTPDemon.java// -----------------------// (C) by Michael Peter Christen; [email protected]// first published on http://www.anomic.de@@ -133,7 +133,7 @@ public final class HTTPDemon implements serverHandler, Cloneable {// for authenticationprivate boolean use_proxyAccounts = false;- private boolean proxyAccounts_init = false; // is use_proxyAccounts set?+ private boolean proxyAccounts_init = false; // is use_proxyAccounts set?private String serverAccountBase64MD5;private String clientIP;private boolean allowProxy;@@ -722,7 +722,7 @@ public final class HTTPDemon implements serverHandler, Cloneable {final String path = this.prop.getProperty(HeaderFramework.CONNECTION_PROP_URL);final String args = this.prop.getProperty(HeaderFramework.CONNECTION_PROP_ARGS, "");switchboard.track(this.userAddress.getHostName(), (args.length() > 0) ? path + "?" + args : path);-+// reseting the empty request counterthis.emptyRequestCount = 0;@@ -1144,9 +1144,6 @@ public final class HTTPDemon implements serverHandler, Cloneable {// set rewrite valuesfinal serverObjects tp = new serverObjects();-// tp.put("host", serverCore.publicIP().getHostAddress());-// tp.put("port", switchboard.getConfig("port", "8080"));-final String clientIP = conProp.getProperty(HeaderFramework.CONNECTION_PROP_CLIENTIP, "127.0.0.1");// check if ip is local ip address@@ -1162,15 +1159,6 @@ public final class HTTPDemon implements serverHandler, Cloneable {tp.put("port", Integer.toString(serverCore.getPortNr(switchboard.getConfig("port", "8080"))));}- // if peer has public address it will be used- if (getAlternativeResolver() != null) {- tp.put("extAddress", getAlternativeResolver().myIP() + ":" + getAlternativeResolver().myPort());- }- // otherwise the local ip address will be used- else {- tp.put("extAddress", tp.get("host", "127.0.0.1") + ":" + tp.get("port", "8080"));- }-tp.put("peerName", (getAlternativeResolver() == null) ? "" : getAlternativeResolver().myName());tp.put("errorMessageType", errorcase);tp.put("httpStatus", Integer.toString(httpStatusCode) + " " + httpStatusText);diff --git a/source/de/anomic/http/server/ProxyLogFormatter.java b/source/de/anomic/http/server/ProxyLogFormatter.javaindex a737e5c0f..bb129e302 100644--- a/source/de/anomic/http/server/ProxyLogFormatter.java+++ b/source/de/anomic/http/server/ProxyLogFormatter.java@@ -1,4 +1,4 @@-//severMiniLogFormatter.java+//ProxyLogFormatter.java//-------------------------------------//part of YACY//(C) by Michael Peter Christen; [email protected]@@ -6,8 +6,8 @@//Frankfurt, Germany, 2004////This file ist contributed by Martin Thelian-//last major change: $LastChangedDate: 2008-12-04 12:54:16 +0000 (Do, 04 Dez 2008) $ by $LastChangedBy: orbiter $-//Revision: $LastChangedRevision: 5379 $+//last change: $LastChangedDate$ by $LastChangedBy$+//Revision: $LastChangedRevision$////This program is free software; you can redistribute it and/or modify//it under the terms of the GNU General Public License as published by@@ -36,17 +36,18 @@ public final class ProxyLogFormatter extends SimpleFormatter {super();}+ @Overridepublic synchronized String format(final LogRecord record) {- final StringBuilder buffer = this.buffer;- buffer.setLength(0);+ final StringBuilder sb = this.buffer;+ sb.setLength(0);- buffer.append(formatMessage(record));+ sb.append(formatMessage(record));// adding the stack trace if available- buffer.append(System.getProperty("line.separator"));+ sb.append(System.getProperty("line.separator"));- return buffer.toString();+ return sb.toString();}}diff --git a/source/de/anomic/http/server/RobotsTxtConfig.java b/source/de/anomic/http/server/RobotsTxtConfig.javaindex 7e8f975c4..24506b4c7 100644--- a/source/de/anomic/http/server/RobotsTxtConfig.java+++ b/source/de/anomic/http/server/RobotsTxtConfig.java@@ -1,4 +1,4 @@-// httpdRobotsTxtConfig.java+// RobotsTxtConfig.java// ---------// part of YaCy// (C) by Michael Peter Christen; [email protected]@@ -8,9 +8,9 @@//// This file is contributed by Franz Brausze//-// $LastChangedDate: $-// $LastChangedRevision: $-// $LastChangedBy: $+// $LastChangedDate$+// $LastChangedRevision$+// $LastChangedBy$//// This program is free software; you can redistribute it and/or modify// it under the terms of the GNU General Public License as published by@@ -89,6 +89,7 @@ public final class RobotsTxtConfig {return new RobotsTxtConfig(cfg.split(","));}+ @Overridepublic String toString() {if (this.allDisallowed) return ALL;final StringBuilder sb = new StringBuilder();diff --git a/source/de/anomic/http/server/ServerSideIncludes.java b/source/de/anomic/http/server/ServerSideIncludes.javaindex 6b516c20b..d382fa03e 100644--- a/source/de/anomic/http/server/ServerSideIncludes.java+++ b/source/de/anomic/http/server/ServerSideIncludes.java@@ -1,13 +1,13 @@-// httpSSI.java+// ServerSideIncludes.java// -----------------------------// (C) 2007 by Michael Peter Christen; [email protected], Frankfurt a. M., Germany// first published 26.06.2007 on http://yacy.net//// This is a part of YaCy, a peer-to-peer based web search engine//-// $LastChangedDate: 2006-04-02 22:40:07 +0200 (So, 02 Apr 2006) $-// $LastChangedRevision: 1986 $-// $LastChangedBy: orbiter $+// $LastChangedDate$+// $LastChangedRevision$+// $LastChangedBy$//// LICENSE//diff --git a/source/de/anomic/http/server/TemplateEngine.java b/source/de/anomic/http/server/TemplateEngine.javaindex 41d8380a0..65ac4e543 100644--- a/source/de/anomic/http/server/TemplateEngine.java+++ b/source/de/anomic/http/server/TemplateEngine.java@@ -1,4 +1,4 @@-//httpTemplate.java+//TemplateEngine.java//-------------------------------------//(C) by Michael Peter Christen; [email protected]//first published on http://www.anomic.de