From c479712f3209debd734fdbfd20b7df3aa0548a80 Mon Sep 17 00:00:00 2001 From: Evan Goode Date: Sun, 23 Mar 2025 15:38:31 -0400 Subject: [PATCH] legacy: rewrite http://session.minecraft.net/game/joinserver.jsp --- .../org/prismlauncher/legacy/fix/online/OnlineModeFix.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/libraries/launcher/legacy/org/prismlauncher/legacy/fix/online/OnlineModeFix.java b/libraries/launcher/legacy/org/prismlauncher/legacy/fix/online/OnlineModeFix.java index 10a674d1e..b822d6469 100644 --- a/libraries/launcher/legacy/org/prismlauncher/legacy/fix/online/OnlineModeFix.java +++ b/libraries/launcher/legacy/org/prismlauncher/legacy/fix/online/OnlineModeFix.java @@ -51,8 +51,11 @@ import java.util.Map; public final class OnlineModeFix { public static URLConnection openConnection(URL address, Proxy proxy) throws IOException { - // we start with "http://www.minecraft.net/game/joinserver.jsp?user=..." - if (!(address.getHost().equals("www.minecraft.net") && address.getPath().equals("/game/joinserver.jsp"))) { + // We start with "http://www.minecraft.net/game/joinserver.jsp?user=..." + // Or, from Beta 1.8 onward, "http://session.minecraft.net/game/joinserver.jsp?user=..." + String host = address.getHost(); + if (!((host.equals("www.minecraft.net") || host.equals("session.minecraft.net")) && + address.getPath().equals("/game/joinserver.jsp"))) { return null; }