Commit 0a348e81 authored by liaozan's avatar liaozan 🏀

Polish

parent e6f5f8b2
package com.schbrain.common.web.utils; package com.schbrain.common.web.utils;
import cn.hutool.core.util.ArrayUtil;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.util.Assert; import org.springframework.util.Assert;
import org.springframework.util.StreamUtils; import org.springframework.util.StreamUtils;
...@@ -58,11 +57,7 @@ public class ContentCachingServletUtils { ...@@ -58,11 +57,7 @@ public class ContentCachingServletUtils {
return null; return null;
} }
} }
byte[] content = nativeRequest.getContentAsByteArray(); return new String(nativeRequest.getContentAsByteArray(), charset);
if (ArrayUtil.isEmpty(content)) {
return null;
}
return new String(content, charset);
} }
} }
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment