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

Removing charset setting when setting default header #2603

Closed
wants to merge 5 commits into from

Conversation

mpark86
Copy link
Contributor

@mpark86 mpark86 commented Dec 13, 2019

Removed charset setting charset=utf-8 as this replaces all content-type settings unless set manually

@MrVine
Copy link

MrVine commented Dec 14, 2019

@mpark86 when request contains JSON body the default value of Content-Type header should be application/json; **charset=utf-8**, because UTF-8 is the default encoding for JSON format in accordance to RFC 7159 Section 8.1:

JSON text SHALL be encoded in UTF-8, UTF-16, or UTF-32. The default
encoding is UTF-8, and JSON texts that are encoded in UTF-8 are
interoperable in the sense that they will be read successfully by the
maximum number of implementations; there are many implementations
that cannot successfully read texts in other encodings (such as
UTF-16 and UTF-32).

@chinesedfan
Copy link
Collaborator

See discussions in #2154 (comment).

@jasonsaayman jasonsaayman self-requested a review February 16, 2021 18:24
@jasonsaayman jasonsaayman self-assigned this Feb 16, 2021
@jasonsaayman jasonsaayman added this to the v0.22.0 milestone Feb 16, 2021
@jasonsaayman jasonsaayman added this to To do in v0.22.0 Mar 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
v0.22.0
  
To do
Development

Successfully merging this pull request may close these issues.

None yet

4 participants