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

SSG: Should the default Content-Type be text/plain? #2244

Open
usualoma opened this issue Feb 19, 2024 · 0 comments
Open

SSG: Should the default Content-Type be text/plain? #2244

usualoma opened this issue Feb 19, 2024 · 0 comments
Labels
enhancement New feature or request.

Comments

@usualoma
Copy link
Member

What is the feature you are proposing?

Currently, if Content-Type is not found, it is processed as text/plain, resulting in a .txt file name.
https://github.com/usualoma/hono/blob/dcb740176f8e4e26783bac05ba5bd6ea7ef4e09d/src/helper/ssg/index.ts#L164

I wonder if there is a case where this fallback works effectively.

hono's app and external APIs almost never return a response without Content-Type, and if Content-Type is not found, it is most likely that "some error has occurred". I think it is better to make it an error as the default behavior.

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

Successfully merging a pull request may close this issue.

1 participant