#610 CASE_INSENSITIVE for charset detect in Content-Type

master
yihua.huang 2017-07-22 17:27:36 +08:00
parent 2183ba9b61
commit 5daf92e8b2
1 changed files with 1 additions and 1 deletions

View File

@ -108,7 +108,7 @@ public class UrlUtils {
return urlList;
}
private static final Pattern patternForCharset = Pattern.compile("charset\\s*=\\s*['\"]*([^\\s;'\"]*)");
private static final Pattern patternForCharset = Pattern.compile("charset\\s*=\\s*['\"]*([^\\s;'\"]*)", Pattern.CASE_INSENSITIVE);
public static String getCharset(String contentType) {
Matcher matcher = patternForCharset.matcher(contentType);