Increasing super_len compatibilty to include BytesIO and cStringIO objects.
authorMatt Spitz <mattspitz@gmail.com>
Thu, 10 Oct 2013 18:54:47 +0000 (14:54 -0400)
committerMatt Spitz <mattspitz@gmail.com>
Thu, 10 Oct 2013 18:54:47 +0000 (14:54 -0400)
commit13a6e02ccd0b932b9cf8b8eb88cdb47ee118bbd1
tree697cdb00edea492dafa6b68f774ec4c2d15c75fd
parent025543b604531fe8f106d87661d14b448ef8e7e9
Increasing super_len compatibilty to include BytesIO and cStringIO objects.

Added a check for 'getvalue' attr, calling it to retrieve the length if we can.

We also try/except the fileno() call, which can throw
io.UnsupportedOperation for BytesIO because, well, they're not files.
requests/utils.py
test_requests.py