moremind commented on issue #3660:
URL:
https://github.com/apache/incubator-shenyu/issues/3660#issuecomment-1173601706
```
private Mono<Void> body(final ServerWebExchange exchange, final
ServerHttpRequest serverHttpRequest, final ShenyuPluginChain chain) {
return Mono.from(serverHttpRequest.getBody()
.flatMap(body -> {
exchange.getAttributes().put(Constants.PARAM_TRANSFORM,
resolveBodyFromRequest(body));
return chain.execute(exchange);
}));
}
```
this code not same to
```
private Mono<Void> body(final ServerWebExchange exchange, final
ServerHttpRequest serverHttpRequest, final ShenyuPluginChain chain) {
return Mono.from(DataBufferUtils.join(serverHttpRequest.getBody())
.flatMap(body -> {
exchange.getAttributes().put(Constants.PARAM_TRANSFORM,
resolveBodyFromRequest(body));
return chain.execute(exchange);
}));
}
```
second code have `DataBufferUtils#join` method, it keep data intactly.
--
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: notifications-unsubscr...@shenyu.apache.org
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org