Skip to content

Not include charset when charset is None #7400

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

Merged
merged 1 commit into from
Jul 7, 2020
Merged

Not include charset when charset is None #7400

merged 1 commit into from
Jul 7, 2020

Conversation

kerokim
Copy link
Contributor

@kerokim kerokim commented Jul 7, 2020

This occurred when APIClient was used in the test code.
When the charset of the renderer is None, such as JSONRender, we will receive application/json; charset=None as the content-type of the request.
So I modified not to include the charset in the content-type if the charset of the renderer is None. As a result of the modified code, the content-type can receive application/json.

@tomchristie
Copy link
Member

Looks good yup, thanks!

@tomchristie tomchristie merged commit d46d5cb into encode:master Jul 7, 2020
@kerokim kerokim deleted the test_not_include_charset branch July 7, 2020 10:15
sigvef pushed a commit to sigvef/django-rest-framework that referenced this pull request Dec 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants