Skip to content

Commit

Permalink
fix(HttpContext): unnecesery string to buffer json encoding
Browse files Browse the repository at this point in the history
  • Loading branch information
zekronium authored and vietj committed Oct 24, 2024
1 parent f0996de commit 39c2bf1
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -474,9 +474,9 @@ private void handleCreateRequest() {
if (body instanceof Buffer) {
buffer = (Buffer) body;
} else if (body instanceof JsonObject) {
buffer = Buffer.buffer(((JsonObject)body).encode());
buffer = ((JsonObject) body).toBuffer();
} else {
buffer = Buffer.buffer(Json.encode(body));
buffer = Json.encodeToBuffer(body);
}
requestOptions.putHeader(HttpHeaders.CONTENT_LENGTH, "" + buffer.length());
requestPromise.future().onSuccess(request -> {
Expand Down

0 comments on commit 39c2bf1

Please sign in to comment.