projects
/
platform
/
upstream
/
python-requests.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f5b0043
)
hurray for passing tests
author
Kenneth Reitz
<me@kennethreitz.com>
Sun, 26 Feb 2012 03:44:46 +0000
(22:44 -0500)
committer
Kenneth Reitz
<me@kennethreitz.com>
Sun, 26 Feb 2012 03:44:46 +0000
(22:44 -0500)
requests/models.py
patch
|
blob
|
history
diff --git
a/requests/models.py
b/requests/models.py
index 8dadf0833ee8d90543e1c72aa6cd965be44d5017..8368c9fb4235e56e03392afd356a4e0942b8cec7 100644
(file)
--- a/
requests/models.py
+++ b/
requests/models.py
@@
-739,8
+739,11
@@
class Response(object):
raise RuntimeError(
'The content for this response was already consumed')
- self._content = bytes().join(self.iter_content()) or bytes()
- # print repr(self._content)
+ if self.status_code is 0:
+ self._content = None
+ else:
+ self._content = bytes().join(self.iter_content()) or bytes()
+
except AttributeError:
self._content = None