diff --git a/requests/models.py b/requests/models.py index 7ac85cc0..7126f08f 100644 --- a/requests/models.py +++ b/requests/models.py @@ -773,17 +773,10 @@ class Response(object): # Decode unicode from given encoding. try: - content = str(self.content, encoding) + content = str(self.content, encoding, errors='replace') except (UnicodeError, TypeError): pass - # Try to fall back: - if not content: - try: - content = str(content, encoding, errors='replace') - except (UnicodeError, TypeError): - pass - return content