From dc3d75c6507e245c0a1840116109b46ae5fd4641 Mon Sep 17 00:00:00 2001 From: Gravita Date: Tue, 17 Aug 2021 15:05:27 +0700 Subject: [PATCH] [FIX] getParamsFromUri UTF-8 --- .../launchserver/socket/handlers/NettyWebAPIHandler.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/handlers/NettyWebAPIHandler.java b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/handlers/NettyWebAPIHandler.java index 33f49a64..b9603131 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/handlers/NettyWebAPIHandler.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/handlers/NettyWebAPIHandler.java @@ -12,7 +12,7 @@ import pro.gravit.utils.helper.IOHelper; import java.net.URLDecoder; -import java.nio.charset.Charset; +import java.nio.charset.StandardCharsets; import java.util.Comparator; import java.util.HashMap; import java.util.Map; @@ -86,7 +86,7 @@ default Map getParamsFromUri(String uri) { String[] result = sub.split("&"); Map map = new HashMap<>(); for (String s : result) { - String c = URLDecoder.decode(s, Charset.defaultCharset()); + String c = URLDecoder.decode(s, StandardCharsets.UTF_8); int index = c.indexOf("="); if (index <= 0) { continue;