From 175f90ac6f720c84610ee3bb46e406203d56eb75 Mon Sep 17 00:00:00 2001 From: Spencer Gibb Date: Mon, 1 Oct 2018 10:46:27 -0400 Subject: [PATCH] Updates to new reactor netty chunkedTransfer method. fixes gh-577 --- .../cloud/gateway/filter/NettyRoutingFilter.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/spring-cloud-gateway-core/src/main/java/org/springframework/cloud/gateway/filter/NettyRoutingFilter.java b/spring-cloud-gateway-core/src/main/java/org/springframework/cloud/gateway/filter/NettyRoutingFilter.java index f28775e22..53279d023 100644 --- a/spring-cloud-gateway-core/src/main/java/org/springframework/cloud/gateway/filter/NettyRoutingFilter.java +++ b/spring-cloud-gateway-core/src/main/java/org/springframework/cloud/gateway/filter/NettyRoutingFilter.java @@ -100,10 +100,8 @@ public class NettyRoutingFilter implements GlobalFilter, Ordered { boolean preserveHost = exchange.getAttributeOrDefault(PRESERVE_HOST_HEADER_ATTRIBUTE, false); - HttpClient client = chunkedTransfer? this.httpClient.chunkedTransfer() : - this.httpClient.noChunkedTransfer(); - - Flux responseFlux = client + Flux responseFlux = this.httpClient + .chunkedTransfer(chunkedTransfer) .request(method) .uri(url) .send((req, nettyOutbound) -> {