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 <lorban@bitronix.be>
  • Loading branch information
lorban committed Nov 6, 2024
1 parent 47a60b6 commit 66b494d
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 66b494d

Please sign in to comment.