diff --git a/independent-projects/resteasy-reactive/client/runtime/src/main/java/org/jboss/resteasy/reactive/client/logging/DefaultClientLogger.java b/independent-projects/resteasy-reactive/client/runtime/src/main/java/org/jboss/resteasy/reactive/client/logging/DefaultClientLogger.java index 2f5b9c632e98e..a7884ecb1e561 100644 --- a/independent-projects/resteasy-reactive/client/runtime/src/main/java/org/jboss/resteasy/reactive/client/logging/DefaultClientLogger.java +++ b/independent-projects/resteasy-reactive/client/runtime/src/main/java/org/jboss/resteasy/reactive/client/logging/DefaultClientLogger.java @@ -57,6 +57,8 @@ public void logRequest(HttpClientRequest request, Buffer body, boolean omitBody) private String bodyToString(Buffer body) { if (body == null) { return ""; + } else if (bodySize <= 0) { + return body.toString(); } else { String bodyAsString = body.toString(); return bodyAsString.substring(0, Math.min(bodySize, bodyAsString.length()));