kennethreitz/requests — Issue #454: 'already consumed' accessing response.text with Content-Length: 0
Author: charles-dyfis-net
Created: 2012-02-24 16:22:26+00:00
State: open

>>> import requests
>>> requests.__version__
'0.10.4'
>>> response = requests.get('http://httpbin.org/stream/0')
>>> response.text
Traceback (most recent call last):
File "", line 1, in
File "/home/cduffy/VC/releng-db/virtualenv/local/lib/python2.7/site-packages/requests/models.py", line 774, in text
content = str(self.content, encoding, errors='replace')
File "/home/cduffy/VC/releng-db/virtualenv/local/lib/python2.7/site-packages/requests/models.py", line 740, in content
'The content for this response was already consumed')
RuntimeError: The content for this response was already consumed