-
Notifications
You must be signed in to change notification settings - Fork 645
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
responseContent()
remove excess ByteBufFlux
conversion
#2792
Conversation
…xcess ByteBufFlux conversion
…xcess ByteBufFlux conversion
…xcess ByteBufFlux conversion
@manzhizhen Please use |
ok, I do it. |
…xcess ByteBufFlux conversion
The failed test on CI for Windows OS is not relevant as it is in |
Okay, get it |
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.
looking good.
reactor-netty-http/src/main/java/reactor/netty/http/client/HttpClientFinalizer.java
Show resolved
Hide resolved
…xcess ByteBufFlux conversion, preserve the contentReceiver constant
…xcess ByteBufFlux conversion, preserve the contentReceiver constant
responseContent()
remove excess ByteBufFlux
conversion
@manzhizhen Thanks for the PR. |
When I looked at the implementation of the class HttpClientFinalizer code, I found that the logic of the responseContent method was a bit strange. HttpClientFinalizer.contentReceiver represents ChannelOperations::receive, while ChannelOperations::receive internal implementation has already made a call to ByteBufFlux.fromInbound to return a ByteBufFlux, and a call and encapsulation of ByteBufFlux.fromInbound has also been made in the responseContent method, This is actually unnecessary, so you can directly refer to the internal implementation of ChannelOperations::receive in the responseContent method to generate ByteBufFlux, which will result in better performance and clearer logic. Similarly, there are similar issues with WebsocketFinalizer:responseContent, which is why this PR.