coheigea commented on a change in pull request #483: HttpHeaderHelper: 
String.replace instead of Pattern.matcher().replaceAll
URL: https://github.com/apache/cxf/pull/483#discussion_r242243934
 
 

 ##########
 File path: core/src/main/java/org/apache/cxf/helpers/HttpHeaderHelper.java
 ##########
 @@ -112,8 +111,8 @@ public static String mapCharset(String enc, String deflt) {
         }
         // Charsets can be quoted. But it's quite certain that they can't have 
escaped quoted or
         // anything like that.
-        enc = charsetPattern.matcher(enc).replaceAll("").trim();
-        if ("".equals(enc)) {
+        enc = enc.replace('"', ' ').replace('\'', ' ').trim();
 
 Review comment:
   LGTM thanks

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to