hono icon indicating copy to clipboard operation
hono copied to clipboard

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

Open usualoma opened this issue 1 year ago • 0 comments

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.

usualoma avatar Feb 19 '24 09:02 usualoma