Skip to content

Commit 41921fa

Browse files
authored
Merge pull request #31532 from brunoborges/patch-1
Interpret negative/zero body-limit as infinite when logging REST Client request body
2 parents 2139851 + c587e2d commit 41921fa

File tree

1 file changed

+2
-0
lines changed
  • independent-projects/resteasy-reactive/client/runtime/src/main/java/org/jboss/resteasy/reactive/client/logging

1 file changed

+2
-0
lines changed

independent-projects/resteasy-reactive/client/runtime/src/main/java/org/jboss/resteasy/reactive/client/logging/DefaultClientLogger.java

+2
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ public void logRequest(HttpClientRequest request, Buffer body, boolean omitBody)
5757
private String bodyToString(Buffer body) {
5858
if (body == null) {
5959
return "";
60+
} else if (bodySize <= 0) {
61+
return body.toString();
6062
} else {
6163
String bodyAsString = body.toString();
6264
return bodyAsString.substring(0, Math.min(bodySize, bodyAsString.length()));

0 commit comments

Comments
 (0)