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

Feature: default body encoding #287

merged 2 commits into from
Oct 1, 2016


Copy link

@digitalresistor digitalresistor commented Sep 30, 2016

Pyramid uses .text in it's renderers, however with the changes made to remove charset when there is no charset on the content-type, this meant that things would break.

Instead add a new default_body_encoding to Response that may be used as the alternative to charset. This will allow .text to continue functioning.

It's a small backwards incompatible change, but if you were relying on WebOb to complain about no charset being set when accessing .text I'd love to have a word with you :-).

Closes #271

Copy link
Member Author

@mmerickel This one's for you!

This is mainly used to allow users to continue using .text even with
Content-Types that don't have a charset.

Looking at you Pyramid...
Copy link

@mmerickel mmerickel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a good best-effort feature to keep the body accessible as text.


@digitalresistor digitalresistor merged commit 7414d49 into master Oct 1, 2016
@digitalresistor digitalresistor deleted the feature/default_body_encoding branch October 1, 2016 03:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

Successfully merging this pull request may close these issues.

None yet

2 participants