You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@eventmesh.apache.org by "mxsm (via GitHub)" <gi...@apache.org> on 2023/02/03 01:06:15 UTC
[GitHub] [incubator-eventmesh] mxsm commented on a diff in pull request #3024: [ISSUE #3020]Get String bytes by StandardCharsets.UTF_8
mxsm commented on code in PR #3024:
URL: https://github.com/apache/incubator-eventmesh/pull/3024#discussion_r1095245908
##########
eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/admin/handler/TopicHandler.java:
##########
@@ -85,8 +86,8 @@ void get(HttpExchange httpExchange) throws IOException {
try {
List<TopicProperties> topicList = admin.getTopic();
String result = JsonUtils.toJson(topicList);
- httpExchange.sendResponseHeaders(200, result.getBytes().length);
- out.write(result.getBytes());
+ httpExchange.sendResponseHeaders(200, result.getBytes(StandardCharsets.UTF_8).length);
Review Comment:
@mytang0 OK I will fix it and resubmit again
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org