fix forbidden api issue

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1860160 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
PJ Fanning 2019-05-27 20:00:04 +00:00
parent 2343919656
commit 0ccbf4671d
1 changed files with 1 additions and 1 deletions

View File

@ -450,7 +450,7 @@ public class MAPIMessage extends POIReadOnlyDocument {
if (headers != null && headers.length > 0) { if (headers != null && headers.length > 0) {
Pattern p = Pattern.compile("content-type:.*?charset=[\"']?([^;'\"]+)[\"']?", Pattern.CASE_INSENSITIVE); Pattern p = Pattern.compile("content-type:.*?charset=[\"']?([^;'\"]+)[\"']?", Pattern.CASE_INSENSITIVE);
for (String header : headers) { for (String header : headers) {
if (header.toLowerCase().startsWith("content-type")) { if (header.toLowerCase(LocaleUtil.getUserLocale()).startsWith("content-type")) {
Matcher m = p.matcher(header); Matcher m = p.matcher(header);
if (m.matches()) { if (m.matches()) {
String encoding = m.group(1); String encoding = m.group(1);