[Fix] Fixed URI parsing

Issue: Can not view non-ascii player name pages
Cause: Raw encoded URI was in use (Contains %20 etc)
Fixed: Decoded URI now in use

Affected issues: #735
This commit is contained in:
Rsl1122 2018-10-14 22:33:19 +03:00
parent fa34a6c0e6
commit ca01c26a19
2 changed files with 2 additions and 2 deletions

View File

@ -28,7 +28,7 @@ public class Request {
public Request(HttpExchange exchange, Locale locale) {
this.requestMethod = exchange.getRequestMethod();
this.target = exchange.getRequestURI().toString();
this.target = exchange.getRequestURI().getPath();
remoteAddress = exchange.getRemoteAddress().getAddress().getHostAddress();

View File

@ -96,7 +96,7 @@ public class ServerPageHandler implements PageHandler {
if (!target.isEmpty()) {
try {
String serverName = target.get(0).replace("%20", " ");
String serverName = target.get(0);
Optional<UUID> serverUUIDOptional = dbSystem.getDatabase().fetch().getServerUUID(serverName);
if (serverUUIDOptional.isPresent()) {
serverUUID = serverUUIDOptional.get();