diff --git a/core/src/main/java/io/undertow/server/protocol/ajp/AjpRequestParser.java b/core/src/main/java/io/undertow/server/protocol/ajp/AjpRequestParser.java index f6e0cc3fcd..527fbfd0a1 100644 --- a/core/src/main/java/io/undertow/server/protocol/ajp/AjpRequestParser.java +++ b/core/src/main/java/io/undertow/server/protocol/ajp/AjpRequestParser.java @@ -77,7 +77,6 @@ public class AjpRequestParser { private final boolean slashDecodingFlag; private final int maxParameters; private final int maxHeaders; - private StringBuilder decodeBuffer; private final boolean allowUnescapedCharactersInUrl; private final Pattern allowedRequestAttributesPattern; @@ -509,9 +508,7 @@ public void parse(final ByteBuffer buf, final AjpRequestParseState state, final private String decode(String url, final boolean containsUrlCharacters) throws UnsupportedEncodingException { if (doDecode && containsUrlCharacters) { try { - if(decodeBuffer == null) { - decodeBuffer = new StringBuilder(); - } + final StringBuilder decodeBuffer = new StringBuilder(); return URLUtils.decode(url, this.encoding, slashDecodingFlag, false, decodeBuffer); } catch (Exception e) { throw UndertowMessages.MESSAGES.failedToDecodeURL(url, encoding, e);