From c25e1aa7ff0df0ca26662dab19ed3fe78de4adb8 Mon Sep 17 00:00:00 2001 From: Greg Wilkins Date: Wed, 13 Mar 2024 21:42:14 +0100 Subject: [PATCH] Fix PerfRegression by preparing field cache (#11517) Fix #11513 by preparing the field cache --- .../src/main/java/org/eclipse/jetty/http/HttpParser.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/jetty-core/jetty-http/src/main/java/org/eclipse/jetty/http/HttpParser.java b/jetty-core/jetty-http/src/main/java/org/eclipse/jetty/http/HttpParser.java index 867b33983cd1..f7907a83f765 100644 --- a/jetty-core/jetty-http/src/main/java/org/eclipse/jetty/http/HttpParser.java +++ b/jetty-core/jetty-http/src/main/java/org/eclipse/jetty/http/HttpParser.java @@ -542,6 +542,7 @@ private boolean quickStartRequestLine(ByteBuffer buffer) buffer.position(position + 2 * Long.BYTES); _methodString = HttpMethod.GET.asString(); _version = HttpVersion.HTTP_1_1; + _fieldCache.prepare(); setState(State.HEADER); _requestHandler.startRequest(_methodString, "/", _version); return true; @@ -551,6 +552,7 @@ private boolean quickStartRequestLine(ByteBuffer buffer) buffer.position(position + 2 * Long.BYTES); _methodString = HttpMethod.GET.asString(); _version = HttpVersion.HTTP_1_0; + _fieldCache.prepare(); setState(State.HEADER); _requestHandler.startRequest(_methodString, "/", _version); return true;