Paper/paper-server/patches/sources/net/minecraft/server
Minecrell 361fc3ab43 Make legacy ping handler more reliable
The Minecraft server often fails to respond to old ("legacy") pings
from old Minecraft versions using the protocol used before the switch
to Netty in Minecraft 1.7.

Due to packet fragmentation[1], we might not have all needed bytes
available when the LegacyPingHandler is called. In this case, it will
run into an error, remove the handler and continue using the modern
protocol.

This is unlikely to happen for the first two revisions of the legacy
ping protocol (used in Minecraft 1.5.x and older) since the request
consists of only one or two bytes, but happens frequently for the
last/third revision introduced in Minecraft 1.6.

It has much larger, variable packet sizes due to the inclusion of
the virtual host (the hostname/port used to connect to the server).

The solution[2] is simple: If we find more than two matching bytes,
we buffer the remaining bytes until we have enough to fully read and
respond to the request.

[1]: https://netty.io/wiki/user-guide-for-4.x.html#wiki-h3-11
[2]: https://netty.io/wiki/user-guide-for-4.x.html#wiki-h4-13
2017-10-11 18:22:50 +02:00
..
bossevents Remap CraftBukkit to Mojang+Yarn Mappings 2024-12-11 22:26:55 +01:00
commands Remap CraftBukkit to Mojang+Yarn Mappings 2024-12-11 22:26:55 +01:00
dedicated Add setting for proxy online mode status 2016-08-05 01:03:08 +02:00
gui Use TerminalConsoleAppender for console improvements 2017-06-09 19:03:43 +02:00
level Extend Player Interact cancellation 2018-02-11 10:43:46 +00:00
network Make legacy ping handler more reliable 2017-10-11 18:22:50 +02:00
packs Build system changes 2016-02-29 20:40:33 -06:00
players Player.setPlayerProfile API 2018-03-18 12:29:48 -04:00
rcon Configurable RCON IP address 2016-04-16 00:39:33 -04:00
Bootstrap.java.patch Fix this stupid bullshit 2017-08-06 17:17:53 -05:00
Main.java.patch Basic PlayerProfile API 2018-01-15 22:11:48 -05:00
MinecraftServer.java.patch Implement extended PaperServerListPingEvent 2017-10-11 15:56:26 +02:00
PlayerAdvancements.java.patch Add PlayerAdvancementCriterionGrantEvent 2018-01-19 08:15:29 -06:00
ServerAdvancementManager.java.patch Configurable Advancement Disabling 2017-06-09 16:29:31 +10:00
ServerFunctionManager.java.patch Remap CraftBukkit to Mojang+Yarn Mappings 2024-12-11 22:26:55 +01:00
ServerScoreboard.java.patch Remap CraftBukkit to Mojang+Yarn Mappings 2024-12-11 22:26:55 +01:00
ServerTickRateManager.java.patch Remap CraftBukkit to Mojang+Yarn Mappings 2024-12-11 22:26:55 +01:00
Services.java.patch Paper config files 2022-06-08 22:20:16 -07:00