legacy: rewrite http://session.minecraft.net/game/joinserver.jsp
This commit is contained in:
parent
b43764d355
commit
c479712f32
@ -51,8 +51,11 @@ import java.util.Map;
|
|||||||
|
|
||||||
public final class OnlineModeFix {
|
public final class OnlineModeFix {
|
||||||
public static URLConnection openConnection(URL address, Proxy proxy) throws IOException {
|
public static URLConnection openConnection(URL address, Proxy proxy) throws IOException {
|
||||||
// we start with "http://www.minecraft.net/game/joinserver.jsp?user=..."
|
// We start with "http://www.minecraft.net/game/joinserver.jsp?user=..."
|
||||||
if (!(address.getHost().equals("www.minecraft.net") && address.getPath().equals("/game/joinserver.jsp"))) {
|
// 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;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user