-
Notifications
You must be signed in to change notification settings - Fork 3k
Open
Labels
type: questionFurther information is requestedFurther information is requested
Description
Question
` CachedBodyOutputMessage outputMessage = ResponseUtils.newCachedBodyOutputMessage(exchange);
return serverRequest.bodyToMono(String.class)
.switchIfEmpty(Mono.defer(() -> Mono.just("")))
.flatMap(convert)
.flatMap(body -> {
BodyInserter<String, ReactiveHttpOutputMessage> bodyInserter = BodyInserters.fromValue(body);
return bodyInserter.insert(outputMessage, new BodyInserterContext());
}).then(Mono.defer(() -> {
ServerHttpRequestDecorator decorator = new RequestDecorator(exchange, outputMessage);
return Mono.just(exchange.mutate().request(decorator).build());
})).onErrorResume(throwable -> ResponseUtils.release(outputMessage, throwable));`
if the filter after this , e.g check some parameter ,call response.write ,the cache body can be release ?
Metadata
Metadata
Assignees
Labels
type: questionFurther information is requestedFurther information is requested