Skip to content

Commit

Permalink
benchmark: align deno_http and node_http response (denoland/deno#3484)
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinkassimo authored and caspervonb committed Jan 24, 2021
1 parent 43b7e0b commit f3820c8
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion http/http_bench.ts
Expand Up @@ -7,5 +7,11 @@ const body = new TextEncoder().encode("Hello World");

console.log(`http://${addr}/`);
for await (const req of server) {
req.respond({ body });
const res = {
body,
headers: new Headers()
};
res.headers.set("Date", new Date().toUTCString());
res.headers.set("Connection", "keep-alive");
req.respond(res).catch(() => {});
}

0 comments on commit f3820c8

Please sign in to comment.