projects
/
services
/
python-requests.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b725bfd
)
don't double decode
author
Kenneth Reitz
<me@kennethreitz.com>
Sun, 22 Jan 2012 03:56:53 +0000
(22:56 -0500)
committer
Kenneth Reitz
<me@kennethreitz.com>
Sun, 22 Jan 2012 03:56:53 +0000
(22:56 -0500)
requests/models.py
patch
|
blob
|
history
diff --git
a/requests/models.py
b/requests/models.py
index
f001c08
..
8a293cb
100644
(file)
--- a/
requests/models.py
+++ b/
requests/models.py
@@
-752,7
+752,8
@@
class Response(object):
# Try to fall back:
try:
- content = unicode(content, encoding, errors='replace')
+ if not content:
+ content = unicode(content, encoding, errors='replace')
except UnicodeError, TypeError:
pass