diff --git a/requests/models.py b/requests/models.py index 2bea18f0..b72ac64c 100644 --- a/requests/models.py +++ b/requests/models.py @@ -771,17 +771,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