Skip to content

Conversation

@usualoma
Copy link
Member

Fix #225

As mentioned in #225, I also believe the timing at which onFound is called in serveStatic of node-server is somewhat premature.

In the hono core, it is called immediately before returning the response, so I think it should be aligned accordingly.

https://github.com/honojs/hono/blob/main/src/middleware/serve-static/index.ts#L117

@usualoma usualoma force-pushed the fix-on-found-timing branch from d33e150 to 68a80cc Compare October 30, 2025 09:26
@usualoma
Copy link
Member Author

@yusukebe
Would you please review this?

Copy link
Member

@yusukebe yusukebe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@yusukebe
Copy link
Member

@usualoma

Thank you! I've confirmed, and it works well. Merging.

@yusukebe yusukebe merged commit 3435875 into honojs:main Oct 31, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

serveStatic: unable to override content-type header in onFound

2 participants