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

charaset parameter is not required for JSON MIME type #3739

Closed
SaekiTominaga opened this issue Dec 11, 2024 · 1 comment · Fixed by #3743
Closed

charaset parameter is not required for JSON MIME type #3739

SaekiTominaga opened this issue Dec 11, 2024 · 1 comment · Fixed by #3743
Labels

Comments

@SaekiTominaga
Copy link
Contributor

What version of Hono are you using?

4.6.13

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

Node.js 22

What steps can reproduce the bug?

When a static JSON file is displayed with serveStatic(), application/json; charset=utf-8 is returned.

What is the expected behavior?

The charset parameter is not required for the MIME type of a JSON.

The current JSON specification (RFC 8259) does not allow anything other than UTF-8 to begin with.

In IANA, application/json is “Optional parameters: n/a”.

Therefore, the MIME type should be only application/json.

What do you see instead?

No response

Additional information

I am ready to do PR !

@yusukebe
Copy link
Member

Hi @SaekiTominaga

You are right. It does not need the charset.

I am ready to do PR !

Please!

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

Successfully merging a pull request may close this issue.

2 participants