-
Notifications
You must be signed in to change notification settings - Fork 883
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
Redundant byte array copying in AsyncRequestBody #1735
Comments
@RoKish seems reasonable, but it's more an enhancement than a bug. If you can send us a PR, we'll be happy to take a look. |
Fixed by #3925 |
|
@all-contributors please add @StephenFlavin for code |
I've put up a pull request to add @StephenFlavin! 🎉 |
Describe the bug
It doesn't make sense to copy a byte array in
AsyncRequestBody#fromBytes
andAsyncRequestBody#fromByteBuffer
since the byte array is copied in the constructor ofByteArrayAsyncRequestBody
afterwards.Possible Solution
I think the best solution will be to copy the byte array in the constructor of
ByteArrayAsyncRequestBody
. Another constructor should be added to accept offset and length in order to support copying fromByteBuffer
.Your Environment
2.7.15
The text was updated successfully, but these errors were encountered: