Skip to content

Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance

remove unused static var from HTTPDProxyHandler

regerad4b2131450b
diff --git a/htroot/SettingsAck_p.java b/htroot/SettingsAck_p.java
index ea9147349..f2373b1ff 100644
--- a/htroot/SettingsAck_p.java
+++ b/htroot/SettingsAck_p.java
@@ -177,9 +177,9 @@ public class SettingsAck_p {
if (post.containsKey("httpNetworking")) {
// set transparent proxy flag
- HTTPDProxyHandler.isTransparentProxy = post.containsKey("isTransparentProxy");
- env.setConfig("isTransparentProxy", HTTPDProxyHandler.isTransparentProxy);
- prop.put("info_isTransparentProxy", HTTPDProxyHandler.isTransparentProxy ? "on" : "off");
+ boolean isTransparentProxy = post.containsKey("isTransparentProxy");
+ env.setConfig("isTransparentProxy", isTransparentProxy);
+ prop.put("info_isTransparentProxy", isTransparentProxy ? "on" : "off");
// setting the keep alive property
HTTPDemon.keepAliveSupport = post.containsKey("connectionKeepAliveSupport");
diff --git a/source/net/yacy/server/http/HTTPDProxyHandler.java b/source/net/yacy/server/http/HTTPDProxyHandler.java
index 344412393..6ce08fdf7 100644
--- a/source/net/yacy/server/http/HTTPDProxyHandler.java
+++ b/source/net/yacy/server/http/HTTPDProxyHandler.java
@@ -100,7 +100,6 @@ public final class HTTPDProxyHandler {
private static final HashSet<String> yellowList;
private static int timeout = 60000;
private static boolean yacyTrigger = true;
- public static boolean isTransparentProxy = false;
private static Process redirectorProcess = null;
private static boolean redirectorEnabled = false;
private static PrintWriter redirectorWriter = null;
@@ -113,7 +112,6 @@ public final class HTTPDProxyHandler {
// creating a logger
private static final ConcurrentLog log = new ConcurrentLog("PROXY");
- private static boolean doAccessLogging = false;
/**
* Do logging configuration for special proxy access log file
*/
@@ -123,13 +121,11 @@ public final class HTTPDProxyHandler {
sb = Switchboard.getSwitchboard();
if (sb != null) {
- isTransparentProxy = Boolean.parseBoolean(sb.getConfig("isTransparentProxy","false"));
-
// set timeout
timeout = Integer.parseInt(sb.getConfig("proxy.clientTimeout", "60000"));
// create a htRootPath: system pages
- htRootPath = new File(sb.getAppPath(), sb.getConfig("htRootPath","htroot"));
+ htRootPath = new File(sb.getAppPath(), sb.getConfig(SwitchboardConstants.HTROOT_PATH,SwitchboardConstants.HTROOT_PATH_DEFAULT));
if (!(htRootPath.exists())) {
if(!htRootPath.mkdir())
ConcurrentLog.severe("PROXY", "could not create htRoot "+ htRootPath);
@@ -170,7 +166,6 @@ public final class HTTPDProxyHandler {
txtLog.setLevel(Level.FINEST);
proxyLogger.addHandler(txtLog);
- doAccessLogging = true;
log.info("Proxy access logging configuration done." +
"\n\tFilename: " + pattern +
"\n\tLimit: " + limitStr +
@@ -1173,8 +1168,6 @@ public final class HTTPDProxyHandler {
*/
private final static synchronized void logProxyAccess(final HashMap<String, Object> conProp) {
- if (!doAccessLogging) return;
-
logMessage.setLength(0);
// Timestamp