Skip to content

Commit

Permalink
Merge pull request quarkusio#31532 from brunoborges/patch-1
Browse files Browse the repository at this point in the history
Interpret negative/zero body-limit as infinite when logging REST Client request body
  • Loading branch information
geoand authored Mar 2, 2023
2 parents 2139851 + c587e2d commit 41921fa
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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()));
Expand Down

0 comments on commit 41921fa

Please sign in to comment.