Skip to content

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

Bugfix for www and share. http://www.yacy-forum.de/viewtopic.php?p=11486

allo4db208018897
diff --git a/source/de/anomic/http/httpdFileHandler.java b/source/de/anomic/http/httpdFileHandler.java
index 39a15b792..e73ad8861 100644
--- a/source/de/anomic/http/httpdFileHandler.java
+++ b/source/de/anomic/http/httpdFileHandler.java
@@ -415,17 +415,20 @@ public final class httpdFileHandler extends httpdAbstractHandler implements http
try {
// locate the file
if (!(path.startsWith("/"))) path = "/" + path; // attach leading slash
- File targetFile = new File(htDefaultPath, path);
+ File targetFile = getLocalizedFile(path);
String targetExt = conProp.getProperty("EXT","");
if (path.endsWith("/")) {
String testpath;
// attach default file name
for (int i = 0; i < defaultFiles.length; i++) {
testpath = path + defaultFiles[i];
- targetFile = new File(htDefaultPath, testpath);
+ targetFile = getLocalizedFile(testpath);
if (!(targetFile.exists())) targetFile = new File(htDocsPath, testpath);
if (targetFile.exists()) {path = testpath; break;}
}
+ }else{
+ if (!(targetFile.exists())) targetFile = new File(htDocsPath, path);
+
}
File targetClass = rewriteClassFile(targetFile);