mirror of
https://github.com/PaperMC/Waterfall.git
synced 2024-11-16 07:15:14 +01:00
85c0a35f0b
Upstream has released updates that appears to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing BungeeCord Changes: 6613aaea Add test fix for library classes being visible to non-dependent plugins 53ce6b93 #3200: Fix protocol for 21w40a d8e29384 #2466: Use switch in "BungeeCord" plugin message handling 5cf869df #3198: Remove terminally deprecated SecurityManager f26f7d88 Add optional 1.18 (21w40a) snapshot protocol support
24 lines
1.0 KiB
Diff
24 lines
1.0 KiB
Diff
From 0cf87c789c24e97cbadb74d50597c15d85006b26 Mon Sep 17 00:00:00 2001
|
|
From: Tux <write@imaginarycode.com>
|
|
Date: Wed, 13 Apr 2016 15:17:05 -0400
|
|
Subject: [PATCH] Presize the HTTP response buffer
|
|
|
|
16 characters is extremely small, and all responses start around 256 bytes. 640 characters seems to be good (covering skins and capes), based on sampling profile API responses.
|
|
|
|
diff --git a/proxy/src/main/java/net/md_5/bungee/http/HttpHandler.java b/proxy/src/main/java/net/md_5/bungee/http/HttpHandler.java
|
|
index 596ced71..b91981e6 100644
|
|
--- a/proxy/src/main/java/net/md_5/bungee/http/HttpHandler.java
|
|
+++ b/proxy/src/main/java/net/md_5/bungee/http/HttpHandler.java
|
|
@@ -16,7 +16,7 @@ public class HttpHandler extends SimpleChannelInboundHandler<HttpObject>
|
|
{
|
|
|
|
private final Callback<String> callback;
|
|
- private final StringBuilder buffer = new StringBuilder();
|
|
+ private final StringBuilder buffer = new StringBuilder(640);
|
|
|
|
@Override
|
|
public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception
|
|
--
|
|
2.30.1 (Apple Git-130)
|
|
|