remove unused static var from HTTPDProxyHandler

pull/1/head
reger 11 years ago
parent 6c6056836d
commit ad4b213145

@ -177,9 +177,9 @@ public class SettingsAck_p {
if (post.containsKey("httpNetworking")) { if (post.containsKey("httpNetworking")) {
// set transparent proxy flag // set transparent proxy flag
HTTPDProxyHandler.isTransparentProxy = post.containsKey("isTransparentProxy"); boolean isTransparentProxy = post.containsKey("isTransparentProxy");
env.setConfig("isTransparentProxy", HTTPDProxyHandler.isTransparentProxy); env.setConfig("isTransparentProxy", isTransparentProxy);
prop.put("info_isTransparentProxy", HTTPDProxyHandler.isTransparentProxy ? "on" : "off"); prop.put("info_isTransparentProxy", isTransparentProxy ? "on" : "off");
// setting the keep alive property // setting the keep alive property
HTTPDemon.keepAliveSupport = post.containsKey("connectionKeepAliveSupport"); HTTPDemon.keepAliveSupport = post.containsKey("connectionKeepAliveSupport");

@ -100,7 +100,6 @@ public final class HTTPDProxyHandler {
private static final HashSet<String> yellowList; private static final HashSet<String> yellowList;
private static int timeout = 60000; private static int timeout = 60000;
private static boolean yacyTrigger = true; private static boolean yacyTrigger = true;
public static boolean isTransparentProxy = false;
private static Process redirectorProcess = null; private static Process redirectorProcess = null;
private static boolean redirectorEnabled = false; private static boolean redirectorEnabled = false;
private static PrintWriter redirectorWriter = null; private static PrintWriter redirectorWriter = null;
@ -113,7 +112,6 @@ public final class HTTPDProxyHandler {
// creating a logger // creating a logger
private static final ConcurrentLog log = new ConcurrentLog("PROXY"); private static final ConcurrentLog log = new ConcurrentLog("PROXY");
private static boolean doAccessLogging = false;
/** /**
* Do logging configuration for special proxy access log file * Do logging configuration for special proxy access log file
*/ */
@ -123,13 +121,11 @@ public final class HTTPDProxyHandler {
sb = Switchboard.getSwitchboard(); sb = Switchboard.getSwitchboard();
if (sb != null) { if (sb != null) {
isTransparentProxy = Boolean.parseBoolean(sb.getConfig("isTransparentProxy","false"));
// set timeout // set timeout
timeout = Integer.parseInt(sb.getConfig("proxy.clientTimeout", "60000")); timeout = Integer.parseInt(sb.getConfig("proxy.clientTimeout", "60000"));
// create a htRootPath: system pages // 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.exists())) {
if(!htRootPath.mkdir()) if(!htRootPath.mkdir())
ConcurrentLog.severe("PROXY", "could not create htRoot "+ htRootPath); ConcurrentLog.severe("PROXY", "could not create htRoot "+ htRootPath);
@ -170,7 +166,6 @@ public final class HTTPDProxyHandler {
txtLog.setLevel(Level.FINEST); txtLog.setLevel(Level.FINEST);
proxyLogger.addHandler(txtLog); proxyLogger.addHandler(txtLog);
doAccessLogging = true;
log.info("Proxy access logging configuration done." + log.info("Proxy access logging configuration done." +
"\n\tFilename: " + pattern + "\n\tFilename: " + pattern +
"\n\tLimit: " + limitStr + "\n\tLimit: " + limitStr +
@ -1173,8 +1168,6 @@ public final class HTTPDProxyHandler {
*/ */
private final static synchronized void logProxyAccess(final HashMap<String, Object> conProp) { private final static synchronized void logProxyAccess(final HashMap<String, Object> conProp) {
if (!doAccessLogging) return;
logMessage.setLength(0); logMessage.setLength(0);
// Timestamp // Timestamp

Loading…
Cancel
Save