Fixed bug with URLs containing "cgi-bin" that don't refer to "cgi-bin" directory in the web root
This commit is contained in:
parent
73a6353a98
commit
a94e619f16
1 changed files with 1 additions and 1 deletions
2
index.js
2
index.js
|
@ -379,7 +379,7 @@ Mod.prototype.callback = function (req, res, serverconsole, responseEnd, href, e
|
||||||
executeCGI("." + a, req, res, dh, nEnv);
|
executeCGI("." + a, req, res, dh, nEnv);
|
||||||
}
|
}
|
||||||
|
|
||||||
var isCgiBin = href.match(new RegExp("/cgi-bin(?:$|[?#/])", os.platform() == "win32" ? "i" : ""));
|
var isCgiBin = href.match(new RegExp("^/cgi-bin(?:$|[?#/])", os.platform() == "win32" ? "i" : ""));
|
||||||
var isScriptExt = scriptExts.indexOf("." + ext) != -1;
|
var isScriptExt = scriptExts.indexOf("." + ext) != -1;
|
||||||
|
|
||||||
if ((href == "/redbrick-interpreters.json" || href == "/redbrick-scriptexts.json" || (os.platform() == "win32" && (href.toLowerCase() == "/redbrick-interpreters.json" || href.toLowerCase() == "/redbrick-scriptexts.json"))) && path.normalize(__dirname + "/../../..") == process.cwd()) {
|
if ((href == "/redbrick-interpreters.json" || href == "/redbrick-scriptexts.json" || (os.platform() == "win32" && (href.toLowerCase() == "/redbrick-interpreters.json" || href.toLowerCase() == "/redbrick-scriptexts.json"))) && path.normalize(__dirname + "/../../..") == process.cwd()) {
|
||||||
|
|
Loading…
Reference in a new issue