RayayChung commented on code in PR #4283:
URL: https://github.com/apache/shenyu/pull/4283#discussion_r1057095482


##########
shenyu-plugin/shenyu-plugin-httpclient/src/main/java/org/apache/shenyu/plugin/httpclient/WebClientPlugin.java:
##########
@@ -63,8 +63,7 @@ protected Mono<ClientResponse> doRequest(final 
ServerWebExchange exchange, final
                         .flatMap(bytes -> Mono.fromCallable(() -> 
Optional.ofNullable(bytes))).defaultIfEmpty(Optional.empty())
                         .flatMap(option -> {
                             final ClientResponse.Builder builder = 
ClientResponse.create(response.statusCode())
-                                    .headers(headers -> 
headers.addAll(response.headers().asHttpHeaders()))
-                                    .cookies(cookies -> 
cookies.addAll(response.cookies()));

Review Comment:
   the data of `response.cookies()` is the subset of 
`response.headers().asHttpHeaders()`, therefore setting headers is also setting 
cookies in the sam time. I have never met the case that cookies is not present 
in headers. Is this case exists?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to