From 9557f02feac8fd3ad2fccf05321d7aab660fb4e5 Mon Sep 17 00:00:00 2001 From: Lachlan Roberts Date: Tue, 27 Mar 2018 12:02:10 +1100 Subject: [PATCH] Fixed converstion to lower case by using StringUtil.asciiToLowerCase method. Signed-off-by: Lachlan Roberts --- .../org/eclipse/jetty/http/MultiPartFormInputStream.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/jetty-http/src/main/java/org/eclipse/jetty/http/MultiPartFormInputStream.java b/jetty-http/src/main/java/org/eclipse/jetty/http/MultiPartFormInputStream.java index ecde9c8e12e..c3f60562eb3 100644 --- a/jetty-http/src/main/java/org/eclipse/jetty/http/MultiPartFormInputStream.java +++ b/jetty-http/src/main/java/org/eclipse/jetty/http/MultiPartFormInputStream.java @@ -201,7 +201,7 @@ public class MultiPartFormInputStream { if (name == null) return null; - return _headers.getValue(name.toLowerCase(Locale.ENGLISH),0); + return _headers.getValue(StringUtil.asciiToLowerCase(name),0); } /** @@ -628,7 +628,7 @@ public class MultiPartFormInputStream public void parsedField(String key, String value) { // Add to headers and mark if one of these fields. // - headers.put(key.toLowerCase(Locale.ENGLISH),value); + headers.put(StringUtil.asciiToLowerCase(key),value); if (key.equalsIgnoreCase("content-disposition")) contentDisposition = value; else if (key.equalsIgnoreCase("content-type")) @@ -657,7 +657,7 @@ public class MultiPartFormInputStream while (tok.hasMoreTokens()) { String t = tok.nextToken().trim(); - String tl = t.toLowerCase(Locale.ENGLISH); + String tl = StringUtil.asciiToLowerCase(t); if (t.startsWith("form-data")) form_data = true; else if (tl.startsWith("name=")) @@ -708,7 +708,7 @@ public class MultiPartFormInputStream @Override public boolean content(ByteBuffer buffer, boolean last) - { + { if (BufferUtil.hasContent(buffer)) { try