You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using application/json; charset=UTF-8 in response header is a common misuse. I think it is better to remove ; charset=UTF-8 from default json response Content-Type header to prevent the misconception.
According to the documentation at rfc8259: JSON spec, JSON has only one encoding type, 'UTF-8'. JSON must be encoded by UTF-8, and there is no "charset" parameter.
The media type for JSON text is application/json.
...
Note: No "charset" parameter is defined for this registration. Adding one really has no effect on compliant recipients.
Issue Description
Using
application/json; charset=UTF-8
in response header is a common misuse. I think it is better to remove; charset=UTF-8
from default json response Content-Type header to prevent the misconception.According to the documentation at rfc8259: JSON spec, JSON has only one encoding type, 'UTF-8'. JSON must be encoded by UTF-8, and there is no "charset" parameter.
Related RFC note link
Related RFC 8.1 Chapter Link
Checklist
Expected behaviour
In response header:
Actual behaviour
Steps to reproduce
any response when to response with JSON(code int, i interface{}),
default response Content-Type header contains
; charset=UTF-8
.Version/commit
v4.11.4
The text was updated successfully, but these errors were encountered: