Update to OrangeCircle 1.1.3

This commit is contained in:
Dorian Niemiec 2024-02-11 15:06:34 +01:00
parent a8617d0be3
commit c1e3bb9620
2 changed files with 4 additions and 2 deletions

View file

@ -126,6 +126,7 @@ Mod.prototype.callback = function (req, res, serverconsole, responseEnd, href, e
if (hso[1] !== undefined) msg = heada.split(" ").splice(1).join(" "); if (hso[1] !== undefined) msg = heada.split(" ").splice(1).join(" ");
} }
} }
var hasLocation = false;
for (var i = 0; i < bheaders.length; i++) { for (var i = 0; i < bheaders.length; i++) {
var headerp = bheaders[i].split(": "); var headerp = bheaders[i].split(": ");
var headern = headerp.shift(); var headern = headerp.shift();
@ -137,11 +138,12 @@ Mod.prototype.callback = function (req, res, serverconsole, responseEnd, href, e
if (!bheaderso["Set-Cookie"]) bheaderso["Set-Cookie"] = []; if (!bheaderso["Set-Cookie"]) bheaderso["Set-Cookie"] = [];
bheaderso["Set-Cookie"].push(headerv); bheaderso["Set-Cookie"].push(headerv);
} else { } else {
if (headern.toLowerCase() == "location") hasLocation = true;
bheaderso[headern] = headerv; bheaderso[headern] = headerv;
} }
} }
if (code == 200 && (bheaderso["Location"] || bheaderso["location"])) { if ((code < 300 || code > 399) && hasLocation) {
code = 302; code = 302;
msg = "Found"; msg = "Found";
} }

View file

@ -1,4 +1,4 @@
{ {
"name": "OrangeCircle SCGI client for SVR.JS", "name": "OrangeCircle SCGI client for SVR.JS",
"version": "1.1.2" "version": "1.1.3"
} }