diff --git a/htroot/ConfigBasic.java b/htroot/ConfigBasic.java index cf0ca5084..0657309ff 100644 --- a/htroot/ConfigBasic.java +++ b/htroot/ConfigBasic.java @@ -52,6 +52,7 @@ import java.lang.reflect.Method; import de.anomic.data.translator; import de.anomic.http.httpHeader; +import de.anomic.http.httpdFileHandler; import de.anomic.kelondro.kelondroBase64Order; import de.anomic.plasma.plasmaSwitchboard; import de.anomic.server.serverCodings; @@ -198,7 +199,8 @@ public class ConfigBasic { boolean properPort = (yacyCore.seedDB.mySeed.isSenior()) || (yacyCore.seedDB.mySeed.isPrincipal()); if ((properPW) && (env.getConfig("defaultFiles", "").startsWith("ConfigBasic.html,"))) { - env.setConfig("defaultFiles", env.getConfig("defaultFiles", "").substring(17)); + env.setConfig("defaultFiles", env.getConfig("defaultFiles", "").substring(17)); + httpdFileHandler.initDefaultPath(); } prop.put("statusName", (properName) ? 1 : 0); diff --git a/source/de/anomic/http/httpdFileHandler.java b/source/de/anomic/http/httpdFileHandler.java index 4452a3b8f..28c612602 100644 --- a/source/de/anomic/http/httpdFileHandler.java +++ b/source/de/anomic/http/httpdFileHandler.java @@ -180,8 +180,7 @@ public final class httpdFileHandler extends httpdAbstractHandler implements http } // create default files array - defaultFiles = switchboard.getConfig("defaultFiles","index.html").split(","); - if (defaultFiles.length == 0) defaultFiles = new String[] {"index.html"}; + initDefaultPath(); // create a htRootPath: system pages if (htRootPath == null) { @@ -217,6 +216,12 @@ public final class httpdFileHandler extends httpdAbstractHandler implements http } } + public static final void initDefaultPath() { + // create default files array + defaultFiles = switchboard.getConfig("defaultFiles","index.html").split(","); + if (defaultFiles.length == 0) defaultFiles = new String[] {"index.html"}; + } + /* * Returns the path of a (existing) localized File, or the english one, if not availible. * @param path is relative from htroot