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

Avoid replacing Net::BufferedIO #991

Merged
merged 1 commit into from
Aug 17, 2022
Merged

Avoid replacing Net::BufferedIO #991

merged 1 commit into from
Aug 17, 2022

Conversation

rzane
Copy link
Contributor

@rzane rzane commented Aug 7, 2022

Ruby's Net::BufferedIO doesn't hit the network; therefore, this library should not be patching it.

I believe that WebMockNetBufferedIO and PatchedIO were introduced so that a String could be used as a raw response. However; it's actually much simpler just to convert the string to a StringIO before attempting to parse the raw HTTP response.

@rzane rzane force-pushed the bufferedio branch 3 times, most recently from c488221 to 93d6c20 Compare August 7, 2022 21:49
@bblimke
Copy link
Owner

bblimke commented Aug 17, 2022

Thank you @rzane . That is a solid simplification of Net::HTTP adapter. Interesting that introduction of custome BufferedIO led to so much added complexity before.

@bblimke bblimke merged commit 102dd56 into bblimke:master Aug 17, 2022
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

Successfully merging this pull request may close these issues.

2 participants