mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2024-12-21 05:50:18 +08:00
[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:
parent
fa34a6c0e6
commit
ca01c26a19
@ -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();
|
||||
|
||||
|
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user