diff --git a/hbase-http/src/main/java/org/apache/hadoop/hbase/http/HttpServer.java b/hbase-http/src/main/java/org/apache/hadoop/hbase/http/HttpServer.java index d2437a1e597..8b4890fa54a 100644 --- a/hbase-http/src/main/java/org/apache/hadoop/hbase/http/HttpServer.java +++ b/hbase-http/src/main/java/org/apache/hadoop/hbase/http/HttpServer.java @@ -107,7 +107,10 @@ public class HttpServer implements FilterContainer { private static final Logger LOG = LoggerFactory.getLogger(HttpServer.class); private static final String EMPTY_STRING = ""; - private static final int DEFAULT_MAX_HEADER_SIZE = 64 * 1024; // 64K + // Jetty's max header size is Character.MAX_VALUE - 1, See ArrayTernaryTrie for more details + // And in newer jetty version, they add a check when creating a server so we must follow this + // limitation otherwise the UTs will fail + private static final int DEFAULT_MAX_HEADER_SIZE = Character.MAX_VALUE - 1; static final String FILTER_INITIALIZERS_PROPERTY = "hbase.http.filter.initializers"; static final String HTTP_MAX_THREADS = "hbase.http.max.threads"; diff --git a/hbase-http/src/main/java/org/apache/hadoop/hbase/util/JSONBean.java b/hbase-http/src/main/java/org/apache/hadoop/hbase/util/JSONBean.java index 9a9761a90a4..970ec547c1c 100644 --- a/hbase-http/src/main/java/org/apache/hadoop/hbase/util/JSONBean.java +++ b/hbase-http/src/main/java/org/apache/hadoop/hbase/util/JSONBean.java @@ -57,7 +57,7 @@ public class JSONBean { private static final String COMMA = ","; private static final String ASTERICK = "*"; private static final Logger LOG = LoggerFactory.getLogger(JSONBean.class); - private static final Gson GSON = GsonUtil.createGson().create(); + private static final Gson GSON = GsonUtil.createGsonWithDisableHtmlEscaping().create(); /** * Use dumping out mbeans as JSON. diff --git a/hbase-protocol-shaded/pom.xml b/hbase-protocol-shaded/pom.xml index 88c17cd979a..423f8d9351f 100644 --- a/hbase-protocol-shaded/pom.xml +++ b/hbase-protocol-shaded/pom.xml @@ -34,7 +34,7 @@ - 3.17.3 + 3.21.1