Skip to content
Myr

Fix content-length: 0

Before adoption: this commit came in with the history the project adopted, so no landing records it.

#454

authored by Kenneth Reitz · committed by Kenneth Reitz · parent 83b4081 · Browse files · 2 files+7 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+7 added−1 removed

  • tests:+6 added−0 removed
  • other:+1 added−1 removed

2 files+7 added−1 removed

modified:requests/models.py+1 added-1 removed
737 unmodified lines
738 if self._content_consumed:739 raise RuntimeError(740 'The content for this response was already consumed')741742 self._content = bytes().join(self.iter_content()) or None742 self._content = bytes().join(self.iter_content()) or bytes()743 # print repr(self._content)744 except AttributeError:745 self._content = None746
47 unmodified lines
modified:tests/test_requests.py+6 added
793 unmodified lines
794 s.config['danger_mode'] = True795 s.get(httpbin('redirect', '4'))796797798 def test_empty_response(self):799 r = requests.get(httpbin('status', '404'))800 r.text801802803804if __name__ == '__main__':805 unittest.main()