Update to YellowSquare 1.1.1
This commit is contained in:
parent
e67b2f0c06
commit
a5f51ee4d2
2 changed files with 6 additions and 6 deletions
10
index.js
10
index.js
|
@ -151,8 +151,8 @@ Mod.prototype.callback = function (req, res, serverconsole, responseEnd, href, e
|
||||||
headers: req.headers,
|
headers: req.headers,
|
||||||
input: inputStream,
|
input: inputStream,
|
||||||
scriptName: a,
|
scriptName: a,
|
||||||
pathInfo: decodeURI(b),
|
pathInfo: decodeURIComponent(b),
|
||||||
pathTranslated: b ? decodeURI((process.cwd() + (require("os").platform == "win32" ? b.replace(/\//g, "\\") : b)).replace((require("os").platform == "win32" ? /\\\\/g : /\/\//g), (require("os").platform == "win32" ? "\\" : "/"))) : "",
|
pathTranslated: b ? ((process.cwd() + decodeURIComponent(require("os").platform == "win32" ? b.replace(/\//g, "\\") : b)).replace((require("os").platform == "win32" ? /\\\\/g : /\/\//g), (require("os").platform == "win32" ? "\\" : "/"))) : "",
|
||||||
scheme: req.socket.encrypted ? "https" : "http",
|
scheme: req.socket.encrypted ? "https" : "http",
|
||||||
env: {},
|
env: {},
|
||||||
jsgi: {
|
jsgi: {
|
||||||
|
@ -200,14 +200,14 @@ Mod.prototype.callback = function (req, res, serverconsole, responseEnd, href, e
|
||||||
}
|
}
|
||||||
|
|
||||||
if (href.match(new RegExp("/jsgi-bin(?:$|[?#/])",os.platform() == "win32" ? "i" : ""))) {
|
if (href.match(new RegExp("/jsgi-bin(?:$|[?#/])",os.platform() == "win32" ? "i" : ""))) {
|
||||||
fs.stat("." + href, function (err, stats) {
|
fs.stat("." + decodeURIComponent(href), function (err, stats) {
|
||||||
if (!err) {
|
if (!err) {
|
||||||
if (!stats.isFile()) {
|
if (!stats.isFile()) {
|
||||||
elseCallback();
|
elseCallback();
|
||||||
} else {
|
} else {
|
||||||
try {
|
try {
|
||||||
executeJSGIWithReqObj(
|
executeJSGIWithReqObj(
|
||||||
href,
|
decodeURIComponent(href),
|
||||||
"",
|
"",
|
||||||
req,
|
req,
|
||||||
res,
|
res,
|
||||||
|
@ -276,7 +276,7 @@ Mod.prototype.callback = function (req, res, serverconsole, responseEnd, href, e
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
checkPath("." + href, function (pathp) {
|
checkPath("." + decodeURIComponent(href), function (pathp) {
|
||||||
if (!pathp) {
|
if (!pathp) {
|
||||||
elseCallback();
|
elseCallback();
|
||||||
} else {
|
} else {
|
||||||
|
|
2
mod.info
2
mod.info
|
@ -1,4 +1,4 @@
|
||||||
{
|
{
|
||||||
"name": "YellowSquare JSGI engine for SVR.JS",
|
"name": "YellowSquare JSGI engine for SVR.JS",
|
||||||
"version": "1.1.0"
|
"version": "1.1.1"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue