mirror of
https://gitee.com/dromara/RuoYi-Vue-Plus.git
synced 2026-09-21 10:35:57 +08:00
fix-格式化代码, 删除getBytes()多余参数
This commit is contained in:
parent
c9d3a97461
commit
bd84ce3d39
@ -28,8 +28,7 @@ public class RepeatedlyRequestWrapper extends HttpServletRequestWrapper {
|
|||||||
request.setCharacterEncoding(Constants.UTF8);
|
request.setCharacterEncoding(Constants.UTF8);
|
||||||
response.setCharacterEncoding(Constants.UTF8);
|
response.setCharacterEncoding(Constants.UTF8);
|
||||||
|
|
||||||
body = StrUtil.str(IoUtil.readBytes(request.getInputStream(), false), StandardCharsets.UTF_8)
|
body = StrUtil.str(IoUtil.readBytes(request.getInputStream(), false), StandardCharsets.UTF_8).getBytes();
|
||||||
.getBytes(StandardCharsets.UTF_8);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@ -51,7 +51,7 @@ public class XssHttpServletRequestWrapper extends HttpServletRequestWrapper {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 为空,直接返回
|
// 为空,直接返回
|
||||||
String json = StrUtil.str(IoUtil.readBytes(super.getInputStream(),false), StandardCharsets.UTF_8);
|
String json = StrUtil.str(IoUtil.readBytes(super.getInputStream(), false), StandardCharsets.UTF_8);
|
||||||
if (StringUtils.isEmpty(json)) {
|
if (StringUtils.isEmpty(json)) {
|
||||||
return super.getInputStream();
|
return super.getInputStream();
|
||||||
}
|
}
|
||||||
@ -89,7 +89,6 @@ public class XssHttpServletRequestWrapper extends HttpServletRequestWrapper {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 是否是Json请求
|
* 是否是Json请求
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
public boolean isJsonRequest() {
|
public boolean isJsonRequest() {
|
||||||
String header = super.getHeader(HttpHeaders.CONTENT_TYPE);
|
String header = super.getHeader(HttpHeaders.CONTENT_TYPE);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user