Fix non-3xx code detection
This commit is contained in:
parent
0901e44f79
commit
6bc064b474
1 changed files with 1 additions and 1 deletions
2
index.js
2
index.js
|
@ -143,7 +143,7 @@ Mod.prototype.callback = function (req, res, serverconsole, responseEnd, href, e
|
|||
}
|
||||
}
|
||||
|
||||
if (code < 300 && code > 399 && hasLocation) {
|
||||
if ((code < 300 || code > 399) && hasLocation) {
|
||||
code = 302;
|
||||
msg = "Found";
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue