mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2025-01-11 10:58:57 +01: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) {
|
public Request(HttpExchange exchange, Locale locale) {
|
||||||
this.requestMethod = exchange.getRequestMethod();
|
this.requestMethod = exchange.getRequestMethod();
|
||||||
this.target = exchange.getRequestURI().toString();
|
this.target = exchange.getRequestURI().getPath();
|
||||||
|
|
||||||
remoteAddress = exchange.getRemoteAddress().getAddress().getHostAddress();
|
remoteAddress = exchange.getRemoteAddress().getAddress().getHostAddress();
|
||||||
|
|
||||||
|
@ -96,7 +96,7 @@ public class ServerPageHandler implements PageHandler {
|
|||||||
|
|
||||||
if (!target.isEmpty()) {
|
if (!target.isEmpty()) {
|
||||||
try {
|
try {
|
||||||
String serverName = target.get(0).replace("%20", " ");
|
String serverName = target.get(0);
|
||||||
Optional<UUID> serverUUIDOptional = dbSystem.getDatabase().fetch().getServerUUID(serverName);
|
Optional<UUID> serverUUIDOptional = dbSystem.getDatabase().fetch().getServerUUID(serverName);
|
||||||
if (serverUUIDOptional.isPresent()) {
|
if (serverUUIDOptional.isPresent()) {
|
||||||
serverUUID = serverUUIDOptional.get();
|
serverUUID = serverUUIDOptional.get();
|
||||||
|
Loading…
Reference in New Issue
Block a user