You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I found a small issue when reading req.Body & res.Body, that was already reported at #38. I looked for the commit that changed it back and it's this one: dc2e2f9
Reading through net/http code I see that the only difference is that it uses io.NopCloser in NewRequest, which is what causes the problem mentioned in #38.
After further investigation, I noticed something: io.NopCloser does not implement ReadByte, which make we fallback to the implementation that is found here in mxj.
I found this issue because I had to make some cleanup to a http.Response.Body and wrapped the returned reader (which probably is a *bufio.Reader) with my custom one, causing the issue mentioned in #38.
As the change made in #38 was rolled back, I'm not sure which is the best fix to the current byteReader implementation though, which is why I am only opening a issue and not a PR.
Hello!
First, thank you for such a great project!
I found a small issue when reading req.Body & res.Body, that was already reported at #38. I looked for the commit that changed it back and it's this one: dc2e2f9
Reading through net/http code I see that the only difference is that it uses
io.NopCloser
inNewRequest
, which is what causes the problem mentioned in #38.After further investigation, I noticed something: io.NopCloser does not implement ReadByte, which make we fallback to the implementation that is found here in mxj.
I found this issue because I had to make some cleanup to a http.Response.Body and wrapped the returned reader (which probably is a *bufio.Reader) with my custom one, causing the issue mentioned in #38.
As the change made in #38 was rolled back, I'm not sure which is the best fix to the current byteReader implementation though, which is why I am only opening a issue and not a PR.
Again, thank you for the great project!
Sample code reproducing the mentioned issue: https://go.dev/play/p/ffJvzhYD1h1
The text was updated successfully, but these errors were encountered: