update 优化 RepeatedlyRequestWrapper 流处理 去除多余编码转换

feature/model
疯狂的狮子li 2 years ago
parent 5952b1c90e
commit 87a212f093

@ -1,7 +1,6 @@
package com.ruoyi.common.filter;
import cn.hutool.core.io.IoUtil;
import cn.hutool.core.util.StrUtil;
import com.ruoyi.common.constant.Constants;
import javax.servlet.ReadListener;
@ -13,7 +12,6 @@ import java.io.BufferedReader;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.nio.charset.StandardCharsets;
/**
* inputStreamrequest
@ -28,7 +26,7 @@ public class RepeatedlyRequestWrapper extends HttpServletRequestWrapper {
request.setCharacterEncoding(Constants.UTF8);
response.setCharacterEncoding(Constants.UTF8);
body = StrUtil.str(IoUtil.readBytes(request.getInputStream(), false), StandardCharsets.UTF_8).getBytes();
body = IoUtil.readBytes(request.getInputStream(), false);
}
@Override

Loading…
Cancel
Save