Fix response mojibake, while SVR.JS is running on Bun
This commit is contained in:
parent
1680398db2
commit
f8234d0d1c
1 changed files with 1 additions and 1 deletions
2
index.js
2
index.js
|
@ -151,7 +151,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) {
|
||||
socket.removeAllListeners("data");
|
||||
socket.removeAllListeners("end");
|
||||
|
|
Loading…
Reference in a new issue