From eb6af4a84ca642eb31c5595fc8963d41da0aea4d Mon Sep 17 00:00:00 2001 From: hongqiaowei Date: Tue, 12 Oct 2021 11:12:35 +0800 Subject: [PATCH] Update version --- fizz-bootstrap/pom.xml | 4 +- fizz-common/pom.xml | 4 +- .../ext/FizzServerWebExchangeDecorator.java | 42 ++++++++----------- fizz-core/pom.xml | 4 +- .../plugin/requestbody/RequestBodyPlugin.java | 4 -- fizz-plugin/pom.xml | 4 +- fizz-spring-boot-starter/pom.xml | 4 +- pom.xml | 4 +- 8 files changed, 23 insertions(+), 47 deletions(-) diff --git a/fizz-bootstrap/pom.xml b/fizz-bootstrap/pom.xml index 2fd62ca..b5a0313 100644 --- a/fizz-bootstrap/pom.xml +++ b/fizz-bootstrap/pom.xml @@ -11,9 +11,7 @@ com.fizzgate fizz-bootstrap - - 2.3.3-beta1 - + 2.3.0-we-code 1.8 diff --git a/fizz-common/pom.xml b/fizz-common/pom.xml index 4e10287..3cf6c59 100644 --- a/fizz-common/pom.xml +++ b/fizz-common/pom.xml @@ -5,9 +5,7 @@ fizz-gateway-community com.fizzgate - - 2.3.3-beta1 - + 2.3.0-we-code ../pom.xml 4.0.0 diff --git a/fizz-common/src/main/java/we/spring/web/server/ext/FizzServerWebExchangeDecorator.java b/fizz-common/src/main/java/we/spring/web/server/ext/FizzServerWebExchangeDecorator.java index 0ba4c7a..00d5113 100644 --- a/fizz-common/src/main/java/we/spring/web/server/ext/FizzServerWebExchangeDecorator.java +++ b/fizz-common/src/main/java/we/spring/web/server/ext/FizzServerWebExchangeDecorator.java @@ -28,11 +28,7 @@ import org.springframework.web.server.ServerWebExchange; import org.springframework.web.server.ServerWebExchangeDecorator; import reactor.core.publisher.Mono; import we.spring.http.server.reactive.ext.FizzServerHttpRequestDecorator; - import we.util.Consts; - - - import we.util.NettyDataBufferUtils; import we.util.ThreadContext; @@ -77,9 +73,7 @@ public class FizzServerWebExchangeDecorator extends ServerWebExchangeDecorator { if (idx == -1) { result.add(URLDecoder.decode(pair, charset.name()), null); } else { - String name = URLDecoder.decode(pair.substring(0, idx), charset.name()); - String value = URLDecoder.decode(pair.substring(idx + 1), charset.name()); result.add(name, value); } @@ -129,26 +123,24 @@ public class FizzServerWebExchangeDecorator extends ServerWebExchangeDecorator { int fs = fieldValuesEntries.size(), cnt = 0; try { for (Map.Entry> fieldValuesEntry : fieldValuesEntries) { - String field = fieldValuesEntry.getKey(); - List values = fieldValuesEntry.getValue(); - if (CollectionUtils.isEmpty(values)) { - - b.append(URLEncoder.encode(field, Consts.C.UTF8)); - } else { - int vs = values.size(); - for (int i = 0; i < vs; ) { - b.append(URLEncoder.encode(field, Consts.C.UTF8)) - .append('=') - .append(URLEncoder.encode(values.get(i), Consts.C.UTF8)); - - if ((++i) != vs) { - b.append('&'); - } - } - } - if ((++cnt) != fs) { - b.append('&'); + String field = fieldValuesEntry.getKey(); + List values = fieldValuesEntry.getValue(); + if (CollectionUtils.isEmpty(values)) { + b.append(URLEncoder.encode(field, Consts.C.UTF8)); + } else { + int vs = values.size(); + for (int i = 0; i < vs; ) { + b.append(URLEncoder.encode(field, Consts.C.UTF8)) + .append('=') + .append(URLEncoder.encode(values.get(i), Consts.C.UTF8)); + if ((++i) != vs) { + b.append('&'); + } } + } + if ((++cnt) != fs) { + b.append('&'); + } } } catch (UnsupportedEncodingException ex) { throw new IllegalStateException(ex); diff --git a/fizz-core/pom.xml b/fizz-core/pom.xml index c8cc959..a0cd6a0 100644 --- a/fizz-core/pom.xml +++ b/fizz-core/pom.xml @@ -5,9 +5,7 @@ fizz-gateway-community com.fizzgate - - 2.3.3-beta1 - + 2.3.0-we-code ../pom.xml 4.0.0 diff --git a/fizz-core/src/main/java/we/plugin/requestbody/RequestBodyPlugin.java b/fizz-core/src/main/java/we/plugin/requestbody/RequestBodyPlugin.java index 380d873..8e85452 100644 --- a/fizz-core/src/main/java/we/plugin/requestbody/RequestBodyPlugin.java +++ b/fizz-core/src/main/java/we/plugin/requestbody/RequestBodyPlugin.java @@ -61,9 +61,7 @@ public class RequestBodyPlugin implements FizzPluginFilter { } finally { NettyDataBufferUtils.release(body); } - // requestDecorator.getHeaders().remove(HttpHeaders.CONTENT_LENGTH); - } ServerWebExchange mutatedExchange = exchange.mutate().request(requestDecorator).build(); ServerWebExchange newExchange = mutatedExchange; @@ -72,10 +70,8 @@ public class RequestBodyPlugin implements FizzPluginFilter { newExchange = new FizzServerWebExchangeDecorator(mutatedExchange); } if (log.isDebugEnabled()) { - String traceId = WebUtils.getTraceId(exchange); log.debug(traceId + " request is decorated", LogService.BIZ_ID, traceId); - } return FizzPluginFilterChain.next(newExchange); } diff --git a/fizz-plugin/pom.xml b/fizz-plugin/pom.xml index ba12fbf..e8626db 100644 --- a/fizz-plugin/pom.xml +++ b/fizz-plugin/pom.xml @@ -5,9 +5,7 @@ fizz-gateway-community com.fizzgate - - 2.3.3-beta1 - + 2.3.0-we-code ../pom.xml 4.0.0 diff --git a/fizz-spring-boot-starter/pom.xml b/fizz-spring-boot-starter/pom.xml index 43118cd..44a638a 100644 --- a/fizz-spring-boot-starter/pom.xml +++ b/fizz-spring-boot-starter/pom.xml @@ -5,9 +5,7 @@ fizz-gateway-community com.fizzgate - - 2.3.3-beta1 - + 2.3.0-we-code ../pom.xml 4.0.0 diff --git a/pom.xml b/pom.xml index e4a3396..65f71b4 100644 --- a/pom.xml +++ b/pom.xml @@ -34,9 +34,7 @@ fizz-gateway-community ${project.artifactId} fizz gateway community - - 2.3.3-beta1 - + 2.3.0-we-code pom fizz-common