Skip to content

Conversation

@maiiku
Copy link

@maiiku maiiku commented May 8, 2015

Defeat value for encoding attribute in class requests.Response is None. If server doesn't set it to something useful (ie on 202 responses) it remains None and gets passed to decode() and thus fails. Class requests. Response has very nice fallback, apparent_encoding, that is provided by the chardet library and can come in handy here.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 92.06% when pulling 8099166 on maiiku:bugfix_use_apparent_encoding_when_none_provided into 949056d on jkeyes:master.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage remained the same at 92.06% when pulling 8099166 on maiiku:bugfix_use_apparent_encoding_when_none_provided into 949056d on jkeyes:master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.03%) to 92.03% when pulling 110eb49 on maiiku:bugfix_use_apparent_encoding_when_none_provided into 949056d on jkeyes:master.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 92.06% when pulling 1b0f1d6 on maiiku:bugfix_use_apparent_encoding_when_none_provided into 949056d on jkeyes:master.

@maiiku maiiku force-pushed the bugfix_use_apparent_encoding_when_none_provided branch from 1b0f1d6 to 964444b Compare May 8, 2015 11:04
@maiiku
Copy link
Author

maiiku commented May 8, 2015

I pulled in #88 into this PR as well
Also #90 does similar changes

@coveralls
Copy link

Coverage Status

Coverage remained the same at 92.06% when pulling 964444b on maiiku:bugfix_use_apparent_encoding_when_none_provided into 949056d on jkeyes:master.

@jkeyes
Copy link
Contributor

jkeyes commented May 9, 2015

Thanks @maiiku, I'll take a look at this today.

@jkeyes
Copy link
Contributor

jkeyes commented May 12, 2015

Fixed and now in version 2.0, available from PyPi. See 8ca7d74 and f911a5f for the changes and tests.

Thanks again, I've added your profile to the AUTHORS page.

@jkeyes jkeyes closed this May 12, 2015
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.

3 participants