Skip to content

Commit cf552ab

Browse files
committed
fix return status code check
1 parent 6cf23f1 commit cf552ab

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "rtjscomp",
3-
"version": "0.9.13",
3+
"version": "0.9.14",
44
"description": "php-like server but with javascript",
55
"repository": {
66
"type": "git",

rtjscomp.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1474,9 +1474,9 @@ const request_handle = async (request, response, https) => {
14741474
}
14751475
if (
14761476
typeof returned !== 'number' ||
1477-
err < 100 ||
1478-
err > 599 ||
1479-
err % 1 > 0
1477+
returned < 100 ||
1478+
returned > 599 ||
1479+
returned % 1 > 0
14801480
) {
14811481
log(`[error] ${path}: invalid status code: ${returned}`);
14821482
throw 500;

0 commit comments

Comments
 (0)