HttpServletRequestWrapper报content-length different from byte array length!
利用HttpServletRequestWrapper包装请求,其他好着,有一个通知接口报错
Content-length different from byte array length! cl=597, array=594
报文太长
解决办法
重写 getContentLength getContentLengthLong
//报文太长报错 Content-length different from byte array length! cl=597, array=594
//重写 getContentLength getContentLengthLong
//2021-01-22 cnzz
@Override
public int getContentLength() {
return body.length;
}
@Override
public long getContentLengthLong() {
return body.length;
}
参考