-
Notifications
You must be signed in to change notification settings - Fork 77
Closed
honojs/hono
#4100Description
Environment
- [email protected] + @hono/[email protected]
- Windows + Node.js 22.13.1
Steps to reproduce
- Set
precompressed: trueforserveStatic() - Call
c.resas in the following code - Prepare the compressed file (e.g.
with-compressed.htmlandwith-compressed.html.br) - Content-Type is set to
text/plain;charset=UTF-8π₯
app.use(
serveStatic({
root: "static",
precompressed: true,
onFound: (_path, c) => {
const { res } = c;
},
})
);Minimal Reproducible Example
I have created MRE in the following repository.
https://github.com/SaekiTominaga/mre-hono-static-compress-node
npm run dev1βhttp://localhost:3000/with-compressed.htmlreturnstext/htmlπnpm run dev2βhttp://localhost:3000/with-compressed.htmlreturnstext/plainπnpm testβ "called `c.res` β with compressed" test fails
Metadata
Metadata
Assignees
Labels
No labels