You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shenyu.apache.org by xi...@apache.org on 2023/01/09 10:28:44 UTC

[shenyu] branch master updated: [ISSUE #4276] remove redundant cookie setting (#4283)

This is an automated email from the ASF dual-hosted git repository.

xiaoyu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shenyu.git


The following commit(s) were added to refs/heads/master by this push:
     new 3dc937b07 [ISSUE #4276] remove redundant cookie setting (#4283)
3dc937b07 is described below

commit 3dc937b07d465f241c8f22243ce7ac4952a4bf91
Author: RayayChung <23...@qq.com>
AuthorDate: Mon Jan 9 18:28:35 2023 +0800

    [ISSUE #4276] remove redundant cookie setting (#4283)
    
    Co-authored-by: ray <zh...@ingbaobei.com>
    Co-authored-by: xiaoyu <xi...@apache.org>
---
 .../main/java/org/apache/shenyu/plugin/httpclient/WebClientPlugin.java | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/shenyu-plugin/shenyu-plugin-httpclient/src/main/java/org/apache/shenyu/plugin/httpclient/WebClientPlugin.java b/shenyu-plugin/shenyu-plugin-httpclient/src/main/java/org/apache/shenyu/plugin/httpclient/WebClientPlugin.java
index 72ad7eb14..47ba6f3c6 100644
--- a/shenyu-plugin/shenyu-plugin-httpclient/src/main/java/org/apache/shenyu/plugin/httpclient/WebClientPlugin.java
+++ b/shenyu-plugin/shenyu-plugin-httpclient/src/main/java/org/apache/shenyu/plugin/httpclient/WebClientPlugin.java
@@ -63,8 +63,7 @@ public class WebClientPlugin extends AbstractHttpClientPlugin<ClientResponse> {
                         .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()));
+                                    .headers(headers -> headers.addAll(response.headers().asHttpHeaders()));
                             if (option.isPresent()) {
                                 final DataBufferFactory dataBufferFactory = exchange.getResponse().bufferFactory();
                                 return Mono.just(builder.body(Flux.just(dataBufferFactory.wrap(option.get()))).build());