修复字符编码检测BUG

master
xbynet 2017-03-31 18:27:18 +08:00
parent 1c24baa8d1
commit c93a8a2722
1 changed files with 1 additions and 1 deletions

View File

@ -26,7 +26,7 @@ public abstract class CharsetUtils {
// charset
// 1、encoding in http header Content-Type
charset = UrlUtils.getCharset(contentType);
if (StringUtils.isNotBlank(contentType)) {
if (StringUtils.isNotBlank(contentType) && StringUtils.isNotBlank(charset)) {
logger.debug("Auto get charset: {}", charset);
return charset;
}