Removes commented out code
This commit is contained in:
@@ -99,12 +99,10 @@ public class ModifyResponseBodyGatewayFilterFactory
|
||||
return bodyInserter.insert(outputMessage, new BodyInserterContext())
|
||||
.then(Mono.defer(() -> {
|
||||
Flux<DataBuffer> messageBody = outputMessage.getBody();
|
||||
//TODO: if (inputStream instanceof Mono) {
|
||||
HttpHeaders headers = getDelegate().getHeaders();
|
||||
if (/*headers.getContentLength() < 0 &&*/ !headers.containsKey(HttpHeaders.TRANSFER_ENCODING)) {
|
||||
messageBody = messageBody.doOnNext(data -> headers.setContentLength(data.readableByteCount()));
|
||||
}
|
||||
// }
|
||||
HttpHeaders headers = getDelegate().getHeaders();
|
||||
if (!headers.containsKey(HttpHeaders.TRANSFER_ENCODING)) {
|
||||
messageBody = messageBody.doOnNext(data -> headers.setContentLength(data.readableByteCount()));
|
||||
}
|
||||
//TODO: use isStreamingMediaType?
|
||||
return getDelegate().writeWith(messageBody);
|
||||
}));
|
||||
|
||||
Reference in New Issue
Block a user