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 c2dd940aa 修复ModifyResponsePlugin会重置ClientResponse 
maxInMemorySize=256K的问题。 (#4306)
c2dd940aa is described below

commit c2dd940aada86222afcdfb5fb615aaef885dc2cd
Author: Will <[email protected]>
AuthorDate: Wed Jan 11 18:18:00 2023 +0800

    修复ModifyResponsePlugin会重置ClientResponse maxInMemorySize=256K的问题。 (#4306)
    
    Co-authored-by: moremind <[email protected]>
---
 .../apache/shenyu/plugin/modify/response/ModifyResponsePlugin.java    | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git 
a/shenyu-plugin/shenyu-plugin-modify-response/src/main/java/org/apache/shenyu/plugin/modify/response/ModifyResponsePlugin.java
 
b/shenyu-plugin/shenyu-plugin-modify-response/src/main/java/org/apache/shenyu/plugin/modify/response/ModifyResponsePlugin.java
index d16b10083..dfd376f6f 100644
--- 
a/shenyu-plugin/shenyu-plugin-modify-response/src/main/java/org/apache/shenyu/plugin/modify/response/ModifyResponsePlugin.java
+++ 
b/shenyu-plugin/shenyu-plugin-modify-response/src/main/java/org/apache/shenyu/plugin/modify/response/ModifyResponsePlugin.java
@@ -41,6 +41,7 @@ import org.springframework.http.HttpHeaders;
 import org.springframework.http.HttpStatus;
 import org.springframework.http.server.reactive.ServerHttpResponseDecorator;
 import org.springframework.web.reactive.function.client.ClientResponse;
+import org.springframework.web.reactive.function.client.ExchangeStrategies;
 import org.springframework.web.server.ServerWebExchange;
 import reactor.core.publisher.Flux;
 import reactor.core.publisher.Mono;
@@ -143,8 +144,9 @@ public class ModifyResponsePlugin extends 
AbstractShenyuPlugin {
             this.getDelegate().getHeaders().clear();
             this.getDelegate().getHeaders().putAll(httpHeaders);
             int rowStatusCode = clientResponse.rawStatusCode();
+            ExchangeStrategies strategies = clientResponse.strategies();
 
-            return ClientResponse.create(statusCode)
+            return ClientResponse.create(statusCode, strategies)
                     .rawStatusCode(rowStatusCode)
                     .headers(headers -> headers.addAll(httpHeaders))
                     .cookies(cookies -> cookies.addAll(this.getCookies()))

Reply via email to