Update README

This commit is contained in:
nolash
2021-02-18 15:27:13 +01:00
parent c415a6b180
commit 3431991565
5 changed files with 331 additions and 25 deletions

View File

@@ -199,9 +199,10 @@ async function processRequest(req, res) {
return;
}
const responseContentLength = (new TextEncoder().encode(content)).length;
res.writeHead(200, {
"Content-Type": contentType,
"Content-Length": content.length,
"Content-Length": responseContentLength,
});
res.write(content);
res.end();