-
Notifications
You must be signed in to change notification settings - Fork 691
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
improve body copy logic #655
improve body copy logic #655
Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #655 +/- ##
==========================================
- Coverage 96.34% 95.60% -0.75%
==========================================
Files 12 11 -1
Lines 1615 1569 -46
==========================================
- Hits 1556 1500 -56
- Misses 37 42 +5
- Partials 22 27 +5
☔ View full report in Codecov by Sentry. |
@zhongdalu-trechina Did you get a chance to test your changes? |
732c199
to
dabc3ee
Compare
yeah, just did some basic testing locally. |
bodyBuf := bytes.NewBuffer(append([]byte{}, r.bodyBuf.Bytes()...)) | ||
r.RawRequest, err = http.NewRequest(r.Method, r.URL, bodyBuf) | ||
// deep copy | ||
bodyCopy := acquireBuffer() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see where you release the acquired buffer
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should be so, but I think there is no place to release it, do you have any ideas?
@zhongdalu-trechina Thanks for your PR. I'm unclear about the improvements this PR brings to body copy handling; I may need time to understand. |
improve #635