Fix response mojibake, while SVR.JS is running on Bun
This commit is contained in:
parent
11b23e99b1
commit
f672fcea71
1 changed files with 1 additions and 1 deletions
2
index.js
2
index.js
|
@ -280,7 +280,7 @@ Mod.prototype.callback = function (req, res, serverconsole, responseEnd, href, e
|
|||
|
||||
try {
|
||||
res.writeHead(code, msg, bheaderso);
|
||||
res.write(buffer.substr(headerendline + eol.length), "latin1");
|
||||
res.write(Buffer.from(buffer.substr(headerendline + eol.length), "latin1"));
|
||||
} catch (ex) {
|
||||
interpreter.removeAllListeners("exit");
|
||||
interpreter.stdout.removeAllListeners("data");
|
||||
|
|
Loading…
Reference in a new issue