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

Fix Default Encoding for application/json Content-Type in HTTP Responses #1422

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

snoopdoggy322
Copy link

This merge request addresses a long-standing issue (#175) where the http package defaults to latin1 encoding when no charset is specified in the Content-Type header. Per RFC 8259, the default encoding for application/json should be utf-8.

The fix ensures that responses with Content-Type: application/json and no explicit charset parameter are decoded using utf8 by default. This change improves compliance with the JSON standard and prevents decoding errors for valid JSON payloads encoded in utf-8.

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

Successfully merging this pull request may close these issues.

1 participant