forked from svrjs/svrjs
Removed undocumented and non-working code.
This commit is contained in:
parent
e84bb426a7
commit
75e987dcf4
2 changed files with 23 additions and 27 deletions
|
@ -3,7 +3,7 @@
|
||||||
"port": 80,
|
"port": 80,
|
||||||
"pubport": 80,
|
"pubport": 80,
|
||||||
"page404": "404.html",
|
"page404": "404.html",
|
||||||
"timestamp": 1694539217054,
|
"timestamp": 1694539313104,
|
||||||
"blacklist": [],
|
"blacklist": [],
|
||||||
"nonStandardCodes": [],
|
"nonStandardCodes": [],
|
||||||
"enableCompression": true,
|
"enableCompression": true,
|
||||||
|
|
48
svr.js
48
svr.js
|
@ -3396,39 +3396,35 @@ if (!cluster.isPrimary) {
|
||||||
|
|
||||||
// Check if index file exists
|
// Check if index file exists
|
||||||
if (req.url == "/" || stats.isDirectory()) {
|
if (req.url == "/" || stats.isDirectory()) {
|
||||||
fs.stat(readFrom + "/.notindex".replace(/\/+/g, "/"), function (e) {
|
fs.stat((readFrom + "/index.html").replace(/\/+/g, "/"), function (e, s) {
|
||||||
if (e) {
|
if (e || !s.isFile()) {
|
||||||
fs.stat((readFrom + "/index.html").replace(/\/+/g, "/"), function (e, s) {
|
fs.stat((readFrom + "/index.htm").replace(/\/+/g, "/"), function (e, s) {
|
||||||
if (e || !s.isFile()) {
|
if (e || !s.isFile()) {
|
||||||
fs.stat((readFrom + "/index.htm").replace(/\/+/g, "/"), function (e, s) {
|
fs.stat((readFrom + "/index.xhtml").replace(/\/+/g, "/"), function (e, s) {
|
||||||
if (e || !s.isFile()) {
|
if (e || !s.isFile()) {
|
||||||
fs.stat((readFrom + "/index.xhtml").replace(/\/+/g, "/"), function (e, s) {
|
properDirectoryListingServe();
|
||||||
if (e || !s.isFile()) {
|
} else {
|
||||||
properDirectoryListingServe();
|
stats = s;
|
||||||
} else {
|
pth = (pth + "/index.xhtml").replace(/\/+/g, "/");
|
||||||
stats = s;
|
ext = "xhtml";
|
||||||
pth = (pth + "/index.xhtml").replace(/\/+/g, "/");
|
readFrom = "./" + pth;
|
||||||
ext = "xhtml";
|
properDirectoryListingServe();
|
||||||
readFrom = "./" + pth;
|
}
|
||||||
properDirectoryListingServe();
|
});
|
||||||
}
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
stats = s;
|
|
||||||
pth = (pth + "/index.htm").replace(/\/+/g, "/");
|
|
||||||
ext = "htm";
|
|
||||||
readFrom = "./" + pth;
|
|
||||||
properDirectoryListingServe();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
} else {
|
} else {
|
||||||
stats = s;
|
stats = s;
|
||||||
pth = (pth + "/index.html").replace(/\/+/g, "/");
|
pth = (pth + "/index.htm").replace(/\/+/g, "/");
|
||||||
ext = "html";
|
ext = "htm";
|
||||||
readFrom = "./" + pth;
|
readFrom = "./" + pth;
|
||||||
properDirectoryListingServe();
|
properDirectoryListingServe();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
stats = s;
|
||||||
|
pth = (pth + "/index.html").replace(/\/+/g, "/");
|
||||||
|
ext = "html";
|
||||||
|
readFrom = "./" + pth;
|
||||||
|
properDirectoryListingServe();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
|
Reference in a new issue