问题描述
在将一个项目从vertex 3.9.1 版本迁移到4.0.3 时,我遇到了以下问题。 我正在发送一个包含来自输入表单的数据的 http POST 请求。
<form method="POST">
<textarea type="text" id="sampledata"></textarea>
<button type="submit" formaction="/sendsampledata">
Insert
</button>
</form>
以前,我可以在输入字段中发送更多参数。例如内容长度:10,000。但是,在迁移到 vertx 4.0.3 后,我可以发送 Content-Length: up to 2k。当我超过此大小 (2K) 时,将返回错误“400 - 错误请求”。
解决方案:
我现在已经通过设置解决了这个问题:
HttpServer server = vertx.createHttpServer(new HttpServerOptions().setMaxFormAttributeSize(10 * 1024));
以前只是:
HttpServer server = vertx.createHttpServer();
也许对某人有帮助。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)