Question
通过 shenyu http 方式上传文件(6M)
返回结果:
{
"code": 413,
"message": "Request Entity Too Large",
"data": null
}
日志:
2022-07-18 19:02:10 [shenyu-netty-epoll-3] INFO org.apache.shenyu.plugin.base.AbstractShenyuPlugin - divide rule success match , rule name :/bader/system/upload
2022-07-18 19:02:10 [shenyu-netty-epoll-3] ERROR org.apache.shenyu.plugin.divide.DividePlugin - request entity is too large
divide 插件 会 获取 header 中 Content-Length 值 和 requestMaxSize 作比较,requestMaxSize 默认值 102400
if (exchange.getRequest().getHeaders().getContentLength() > ruleHandle.getRequestMaxSize()) {
LOG.error("request entity is too large");
Object error = ShenyuResultWrap.error(exchange, ShenyuResultEnum.REQUEST_ENTITY_TOO_LARGE, null);
return WebFluxResultUtils.result(exchange, error);
}
Question
通过 shenyu http 方式上传文件(6M)
返回结果:
{
"code": 413,
"message": "Request Entity Too Large",
"data": null
}
日志:
2022-07-18 19:02:10 [shenyu-netty-epoll-3] INFO org.apache.shenyu.plugin.base.AbstractShenyuPlugin - divide rule success match , rule name :/bader/system/upload
2022-07-18 19:02:10 [shenyu-netty-epoll-3] ERROR org.apache.shenyu.plugin.divide.DividePlugin - request entity is too large
divide 插件 会 获取 header 中 Content-Length 值 和 requestMaxSize 作比较,requestMaxSize 默认值 102400
if (exchange.getRequest().getHeaders().getContentLength() > ruleHandle.getRequestMaxSize()) {
LOG.error("request entity is too large");
Object error = ShenyuResultWrap.error(exchange, ShenyuResultEnum.REQUEST_ENTITY_TOO_LARGE, null);
return WebFluxResultUtils.result(exchange, error);
}