From ce26ae76c2cf93cb25be5356fdfb26f32820436b Mon Sep 17 00:00:00 2001 From: Andrew Steinborn Date: Thu, 22 Apr 2021 11:23:42 -0400 Subject: [PATCH] Fix case-sensitivity for ping passthrough --- .../proxy/connection/client/StatusSessionHandler.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/proxy/src/main/java/com/velocitypowered/proxy/connection/client/StatusSessionHandler.java b/proxy/src/main/java/com/velocitypowered/proxy/connection/client/StatusSessionHandler.java index d17a419dc..792c5b458 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/connection/client/StatusSessionHandler.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/connection/client/StatusSessionHandler.java @@ -41,6 +41,7 @@ import io.netty.buffer.ByteBuf; import java.net.InetSocketAddress; import java.util.ArrayList; import java.util.List; +import java.util.Locale; import java.util.Optional; import java.util.concurrent.CompletableFuture; import org.apache.logging.log4j.LogManager; @@ -167,6 +168,7 @@ public class StatusSessionHandler implements MinecraftSessionHandler { return CompletableFuture.completedFuture(constructLocalPing(shownVersion)); } else { String virtualHostStr = inbound.getVirtualHost().map(InetSocketAddress::getHostString) + .map(str -> str.toLowerCase(Locale.ROOT)) .orElse(""); List serversToTry = server.getConfiguration().getForcedHosts().getOrDefault( virtualHostStr, server.getConfiguration().getAttemptConnectionOrder());