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
merged 2 commits into from Oct 1, 2016

Conversation

Projects
None yet
2 participants
@bertjwregeer
Copy link
Member

bertjwregeer 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

@bertjwregeer

This comment has been minimized.

Copy link
Member

bertjwregeer commented Sep 30, 2016

@mmerickel This one's for you!

bertjwregeer added some commits Sep 30, 2016

Teach Response about default_body_encoding
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...

@bertjwregeer bertjwregeer force-pushed the feature/default_body_encoding branch from 867c800 to 99c3e76 Sep 30, 2016

@mmerickel
Copy link
Member

mmerickel left a comment

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

LGTM

@bertjwregeer bertjwregeer merged commit 7414d49 into master Oct 1, 2016

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@bertjwregeer bertjwregeer deleted the feature/default_body_encoding branch Oct 1, 2016

@pyup-bot pyup-bot referenced this pull request Nov 3, 2017

Closed

Update webob to 1.7.3 #434

@pyup-bot pyup-bot referenced this pull request Jan 26, 2018

Closed

Update webob to 1.7.4 #407

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