Fix response mojibake, while SVR.JS is running on Bun
This commit is contained in:
parent
7c4121c55d
commit
4af71a094d
1 changed files with 1 additions and 1 deletions
2
index.js
2
index.js
|
@ -465,7 +465,7 @@ Mod.prototype.callback = function (req, res, serverconsole, responseEnd, href, e
|
||||||
|
|
||||||
try {
|
try {
|
||||||
res.writeHead(code, msg, bheaderso);
|
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) {
|
} catch (ex) {
|
||||||
handler.removeAllListeners("exit");
|
handler.removeAllListeners("exit");
|
||||||
handler.stdout.removeAllListeners("data");
|
handler.stdout.removeAllListeners("data");
|
||||||
|
|
Loading…
Reference in a new issue