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

bug(fetch): Response.json should set charset type in content type header #15884

Closed
erfanium opened this issue Sep 13, 2022 · 1 comment
Closed
Labels
ext/fetch related to the ext/fetch working as designed this is working as intended

Comments

@erfanium
Copy link
Contributor

erfanium commented Sep 13, 2022

res.contentType = "application/json";

shouldn't be something like this?

 res.contentType = "application/json; charset=utf-8"; 
@lucacasonato
Copy link
Member

No (see https://fetch.spec.whatwg.org/#dom-response-json).

application/json has no charset property in the IANA mime type registry.

Also see whatwg/fetch#1392 (comment)

@lucacasonato lucacasonato closed this as not planned Won't fix, can't repro, duplicate, stale Sep 13, 2022
@lucacasonato lucacasonato added working as designed this is working as intended ext/fetch related to the ext/fetch labels Sep 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ext/fetch related to the ext/fetch working as designed this is working as intended
Projects
None yet
Development

No branches or pull requests

2 participants