1
0
Fork 0
forked from svrjs/svrjs

Update to SVR.JS 3.4.22

This commit is contained in:
Dorian Niemiec 2023-08-21 19:51:54 +02:00
parent 6a5c4685cf
commit c163afa200
4 changed files with 37 additions and 27 deletions

View file

@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
<head>
<title>SVR.JS 3.4.21</title>
<title>SVR.JS 3.4.22</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta charset="UTF-8" />
<style>
@ -12,7 +12,7 @@
</style>
</head>
<body>
<h1>Welcome to SVR.JS 3.4.21</h1>
<h1>Welcome to SVR.JS 3.4.22</h1>
<br/>
<img src="/logo.png" style="width: 256px;" />
<br/>
@ -110,14 +110,8 @@
</div>
<p>Changes:</p>
<ul>
<li>Changed descriptions of 501 and 503 errors.</li>
<li>Disabled open proxy in default server-side JavaScript.</li>
<li>Fixed NotImplementedError in "cluster" module when running SVR.JS on newer versions of Bun.</li>
<li>Fixed redirect loops related to URL sanitizer.</li>
<li>Fixed SVR.JS proxy API.</li>
<li>Improved Bun IPC shim connection error handling.</li>
<li>Improved server error handling for Bun.</li>
<li>Updated svrpasswd tool.</li>
<li>ENAMETOOLONG errors now correspond to 414 code.</li>
<li>EMFILE errors now correspond to 503 code.</li>
</ul>
<p>Bugs:</p>
<ul>

View file

@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
<head>
<title>SVR.JS 3.4.21 Licenses</title>
<title>SVR.JS 3.4.22 Licenses</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta charset="UTF-8" />
<style>
@ -12,8 +12,8 @@
</style>
</head>
<body>
<h1>SVR.JS 3.4.21 Licenses</h1>
<h2>SVR.JS 3.4.21</h2>
<h1>SVR.JS 3.4.22 Licenses</h1>
<h2>SVR.JS 3.4.22</h2>
<div style="display: inline-block; text-align: left; border-width: 2px; border-style: solid; border-color: gray; padding: 8px;">
MIT License<br/>
<br/>
@ -37,7 +37,7 @@
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE<br/>
SOFTWARE.<br/>
</div>
<h2>Packages used by SVR.JS 3.4.21 and utilities</h2>
<h2>Packages used by SVR.JS 3.4.22 and utilities</h2>
<div style="width: 100%; background-color: #ccc; border: 1px solid green; text-align: left; margin: 10px 0;">
<div style="float: right;">License: MIT</div>
<div style="font-size: 20px;">

38
svr.js
View file

@ -71,7 +71,7 @@ function deleteFolderRecursive(path) {
}
var os = require("os");
var version = "3.4.21";
var version = "3.4.22";
var singlethreaded = false;
if (process.versions) process.versions.svrjs = version; //Inject SVR.JS into process.versions
@ -2026,8 +2026,10 @@ if (!cluster.isPrimary) {
additionalError = 404;
} else if (ex.code == "EACCES") {
additionalError = 403;
} else if (ex.code == "ENAMETOOLONG") {
additionalError = 414;
} else if (ex.code == "EMFILE") {
additionalError = 429;
additionalError = 503;
} else if (ex.code == "ELOOP") {
additionalError = 508;
}
@ -2431,8 +2433,10 @@ if (!cluster.isPrimary) {
additionalError = 404;
} else if (ex.code == "EACCES") {
additionalError = 403;
} else if (ex.code == "ENAMETOOLONG") {
additionalError = 414;
} else if (ex.code == "EMFILE") {
additionalError = 429;
additionalError = 503;
} else if (ex.code == "ELOOP") {
additionalError = 508;
}
@ -3105,8 +3109,10 @@ if (!cluster.isPrimary) {
additionalError = 404;
} else if (ex.code == "EACCES") {
additionalError = 403;
} else if (ex.code == "ENAMETOOLONG") {
additionalError = 414;
} else if (ex.code == "EMFILE") {
additionalError = 429;
additionalError = 503;
} else if (ex.code == "ELOOP") {
additionalError = 508;
}
@ -3379,8 +3385,10 @@ if (!cluster.isPrimary) {
} else if (err.code == "EACCES") {
callServerError(403);
serverconsole.errmessage("Access denied.");
} else if (err.code == "ENAMETOOLONG") {
callServerError(414);
} else if (err.code == "EMFILE") {
callServerError(429);
callServerError(503);
} else if (err.code == "ELOOP") {
callServerError(508);
} else {
@ -3579,8 +3587,10 @@ if (!cluster.isPrimary) {
} else if (ex.code == "EACCES") {
callServerError(403);
serverconsole.errmessage("Access denied.");
} else if (ex.code == "EMFILE") {
callServerError(429);
} else if (err.code == "ENAMETOOLONG") {
callServerError(414);
} else if (err.code == "EMFILE") {
callServerError(503);
} else if (ex.code == "ELOOP") {
callServerError(508);
} else {
@ -3609,8 +3619,10 @@ if (!cluster.isPrimary) {
} else if (err.code == "EACCES") {
callServerError(403);
serverconsole.errmessage("Access denied.");
} else if (err.code == "ENAMETOOLONG") {
callServerError(414);
} else if (err.code == "EMFILE") {
callServerError(429);
callServerError(503);
} else if (err.code == "ELOOP") {
callServerError(508);
} else {
@ -3704,8 +3716,10 @@ if (!cluster.isPrimary) {
} else if (err.code == "EACCES") {
callServerError(403);
serverconsole.errmessage("Access denied.");
} else if (err.code == "ENAMETOOLONG") {
callServerError(414);
} else if (err.code == "EMFILE") {
callServerError(429);
callServerError(503);
} else if (err.code == "ELOOP") {
callServerError(508);
} else {
@ -3761,8 +3775,10 @@ if (!cluster.isPrimary) {
} else if (ex.code == "EACCES") {
callServerError(403);
serverconsole.errmessage("Access denied.");
} else if (ex.code == "EMFILE") {
callServerError(429);
} else if (err.code == "ENAMETOOLONG") {
callServerError(414);
} else if (err.code == "EMFILE") {
callServerError(503);
} else if (ex.code == "ELOOP") {
callServerError(508);
} else {

View file

@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
<head>
<title>SVR.JS 3.4.21 Tests</title>
<title>SVR.JS 3.4.22 Tests</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta charset="UTF-8" />
<style>
@ -12,7 +12,7 @@
</style>
</head>
<body>
<h1>SVR.JS 3.4.21 Tests</h1>
<h1>SVR.JS 3.4.22 Tests</h1>
<h2>Directory</h2>
<iframe src="/testdir" width="50%" height="300px"></iframe>
<h2>Directory (with query)</h2>