diff --git a/cli/bench/http/bun_hono_router.js b/cli/bench/http/bun_hono_router.js index a0bba67d53..38f9c35423 100644 --- a/cli/bench/http/bun_hono_router.js +++ b/cli/bench/http/bun_hono_router.js @@ -3,6 +3,10 @@ const port = Bun.argv[2] || "4545"; const { Hono } = require("../testdata/npm/hono/dist/index.js"); const app = new Hono(); +app.use("*", async (c, n) => { + c.res.headers.set("Date", (new Date()).toUTCString()); + await n(); +}); app.get("/", (c) => c.text("Hello, World!")); Bun.serve({ diff --git a/cli/bench/http/bun_http.js b/cli/bench/http/bun_http.js index a4cd2c5620..89ff9b1211 100644 --- a/cli/bench/http/bun_http.js +++ b/cli/bench/http/bun_http.js @@ -2,7 +2,9 @@ const port = Bun.argv[2] || "4545"; Bun.serve({ fetch(_req) { - return new Response("Hello World"); + return new Response("Hello World", { + headers: { "Date": (new Date()).toUTCString() }, + }); }, port: Number(port), }); diff --git a/cli/bench/http/bun_http_send_file.js b/cli/bench/http/bun_http_send_file.js index 615c35d31a..268da9ae96 100644 --- a/cli/bench/http/bun_http_send_file.js +++ b/cli/bench/http/bun_http_send_file.js @@ -6,7 +6,9 @@ const path = new URL("../testdata/128k.bin", import.meta.url).pathname; Bun.serve({ fetch(_req) { const file = Bun.file(path); - return new Response(file); + return new Response(file, { + headers: { "Date": (new Date()).toUTCString() }, + }); }, port: Number(port), });