hono
hono copied to clipboard
SSG: Should the default Content-Type be text/plain?
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.