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 8b452be89e7c..8c45d4f8aca2 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 @@ -108,7 +108,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 9a9761a90a40..970ec547c1c1 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 092cc19bd0a0..e8c69c3b574a 100644 --- a/hbase-protocol-shaded/pom.xml +++ b/hbase-protocol-shaded/pom.xml @@ -34,7 +34,7 @@ - 3.17.3 + 3.21.1