Read()-ing a response raises ValueError
Bug #1616690 reported by
Jamie Lennox
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
requests-mock |
Fix Released
|
Medium
|
Jamie Lennox |
Bug Description
When you read() from a closed HTTPResponse object it returns a b'' [1]. When you read from a closed BytesIO object you get a ValueError. This is very rarely a problem unless you have something like swiftclient that is reading directly from the urllib3 response and expecting this behaviour.
We should be as compatible as possible and fix it to return a b''.
[1] https:/
Changed in requests-mock: | |
importance: | Undecided → Medium |
Changed in requests-mock: | |
milestone: | none → 1.1 |
To post a comment you must log in.
Fix proposed to branch: master /review. openstack. org/360137
Review: https:/