Skip to content

Commit

Permalink
🐛 Use UTF_8 in ChannelReader.receiveFullString()
Browse files Browse the repository at this point in the history
  • Loading branch information
ujibang committed May 3, 2024
1 parent 5d2bfbe commit 568f82f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion commons/src/main/java/org/restheart/utils/ChannelReader.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
package org.restheart.utils;

import java.io.IOException;
import java.nio.charset.Charset;

import io.undertow.server.HttpServerExchange;

Expand All @@ -41,7 +42,8 @@ public static String readString(HttpServerExchange exchange) throws IOException

receiver.receiveFullString(
(_exchange, data) -> ret[0] = data,
(_exchange, ioe) -> LambdaUtils.throwsSneakyException(ioe));
(_exchange, ioe) -> LambdaUtils.throwsSneakyException(ioe),
Charset.defaultCharset());

return ret[0];
}
Expand Down

0 comments on commit 568f82f

Please sign in to comment.