yhs0092 opened a new issue, #3552:
URL: https://github.com/apache/servicecomb-java-chassis/issues/3552
## 复现方法
在microservice.yaml配置`servicecomb.rest.server.maxFormAttributeSize=500`,
写一个接收String类型表单参数的接口, 传递超过500字节的参数.
在 Java-Chassis 1.3.8 版本, 得到的错误响应是 500 状态码, body为
`{"message":"java.io.IOException: Size exceed allowed maximum capacity"}`. 而在
2.8.2 版本, 得到的错误响应是 500 状态码, body为 `{"message":"Internal Server Error"}`.
## 根因
两个版本都是Netty的`AbstractHttpData.checkSize`方法检测到 form 表单参数超限, 抛出 `IOException`,
异常传递到
`org.apache.servicecomb.transport.rest.vertx.VertxRestDispatcher#sendExceptionByRoutingContext`
方法转换成 HTTP response 返回.
不同之处在于, 2.8.2 版本的这个方法不会调用 `e.getMessage()` 获取异常的错误信息, 设置到 body 中.
不确定这里是不是为了安全原因做的修改, 能否优化一下, 让报错更清晰呢?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]