Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

serveStatic invalid response when index.html is not found #3628

Closed
alexgleason opened this issue Nov 4, 2024 · 0 comments
Closed

serveStatic invalid response when index.html is not found #3628

alexgleason opened this issue Nov 4, 2024 · 0 comments
Labels

Comments

@alexgleason
Copy link

What version of Hono are you using?

4.6.9

What runtime/platform is your app running on? (with version if possible)

Deno

What steps can reproduce the bug?

const publicFiles = serveStatic({ root: './public/' });
app.use('/.well-known/*', publicFiles);

Ensure that ./public/.well-known/ exists, but does not contain an index.html, then:

➜  curl http://0.0.0.0:4036/.well-known/
curl: (18) transfer closed with outstanding read data remaining
➜  curl http://0.0.0.0:4036/.well-known
curl: (18) transfer closed with outstanding read data remaining

What is the expected behavior?

It should return a valid 404 response.

What do you see instead?

It does not return a valid response.

Additional information

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants