Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Verify that the FakeOpener doesn't use a different codepath than standard HTTP responses #210

Open
mineo opened this issue Sep 15, 2016 · 0 comments
Milestone

Comments

@mineo
Copy link
Collaborator

mineo commented Sep 15, 2016

After looking at #208 I'm wondering if using StringIO in the FakeOpener doesn't change the behaviour a bit because resp in

resp = _safe_read(opener, req, body)
is then of type str instead of bytes. This is hidden by parse_message which calls bytes_to_elementtree right at the beginning, which calls _unicode, which is is basically a noop for strs. For the standard HTTPResponse.read(), which returns bytes, the codepath is the same up to _unicode, which in that case is not a noop.

@alastair alastair modified the milestone: 0.7 Dec 2, 2016
@alastair alastair modified the milestones: 0.7, 0.8 Sep 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants