Skip to content

Conversation

@digitalresistor
Copy link
Member

@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

@digitalresistor
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...
@digitalresistor digitalresistor force-pushed the feature/default_body_encoding branch from 867c800 to 99c3e76 Compare September 30, 2016 06:08
Copy link
Member

@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.

LGTM

@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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants