Skip to content

Commit

Permalink
If body is empty then return publisher emitting response instead of p…
Browse files Browse the repository at this point in the history
…ropagating empty publisher (#4208)
  • Loading branch information
anuchandy authored Jul 2, 2019
1 parent bda5512 commit 01f35f0
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ private Function<HttpResponse, Mono<HttpResponse>> logResponseDelegate(final Cli
logger.asInfo().log("Response body:\n{}", bodyStr);
logger.asInfo().log("<-- END HTTP");
return bufferedResponse;
});
}).switchIfEmpty(Mono.defer(() -> Mono.just(bufferedResponse)));
} else {
logger.asInfo().log("(body content not logged)");
logger.asInfo().log("<-- END HTTP");
Expand Down

0 comments on commit 01f35f0

Please sign in to comment.