hurray for passing tests
authorKenneth Reitz <me@kennethreitz.com>
Sun, 26 Feb 2012 03:44:46 +0000 (22:44 -0500)
committerKenneth Reitz <me@kennethreitz.com>
Sun, 26 Feb 2012 03:44:46 +0000 (22:44 -0500)
requests/models.py

index 8dadf0833ee8d90543e1c72aa6cd965be44d5017..8368c9fb4235e56e03392afd356a4e0942b8cec7 100644 (file)
@@ -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