shenyu icon indicating copy to clipboard operation
shenyu copied to clipboard

request entity is too large

Open iufly opened this issue 3 years ago • 1 comments

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); }

iufly avatar Jul 18 '22 11:07 iufly

can you set requestMaxSize == 0 or more than 102400?

yu199195 avatar Jul 19 '22 03:07 yu199195

Snipaste_2022-09-29_16-28-03

anumber avatar Sep 29 '22 08:09 anumber