Skip to content

Commit

Permalink
#12469 - use faster UTF8 encoding
Browse files Browse the repository at this point in the history
Signed-off-by: Ludovic Orban <[email protected]>
  • Loading branch information
lorban committed Nov 5, 2024
1 parent bfd384a commit 316065a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -765,7 +765,7 @@ public Content.Chunk read()
builder.append("\r\n");

// TODO: use a ByteBuffer pool and direct ByteBuffers?
ByteBuffer byteBuffer = UTF_8.encode(builder.toCompleteString());
ByteBuffer byteBuffer = ByteBuffer.wrap(builder.toCompleteString().getBytes(UTF_8));
state = State.CONTENT;
yield Content.Chunk.from(byteBuffer, false);
}
Expand Down

0 comments on commit 316065a

Please sign in to comment.