java - Jetty Apache Camel - 最大标头大小 - 431 错误
问题描述
我已经在 apache camel 中定义了休息端点(在 karaf 内运行)并且我收到了非常大的(> 8500)标头。Jetty 抛出 431 状态码(请求标头字段太大)。是否有可能避免检查标头大小(只是暂时的)或更改限制?我像这样使用码头:
restConfiguration()
.component("jetty")
.port("7777");
RestDefinition restDefinition = rest(REST_PATH)
.consumes("application/json")
.produces("application/json");
restDefinition.get("view2").to("direct:getView2");
有这个方法
.clientRequestValidation(false)
...但它不起作用
解决方案
您可以requestHeaderSize
在 Camel jetty 组件上配置该选项,以设置更高的值。请参阅以下文档:https ://camel.apache.org/components/latest/jetty-component.html
由于您使用的是 rest-dsl,因此您可以componentProperty
通过restConfiguration
. 请参阅以下 dsl 文档:https ://camel.apache.org/manual/latest/rest-dsl.html
推荐阅读
- java - DriveClient 需要使用哪些库?
- rose-compiler-framework - EDG 二进制压缩包不可用
- javascript - 在数据表中提取和显示附加数据
- jq - 如何在jq中递归地做模糊搜索键名
- angular - FabricJs - 大图像移动滞后
- google-apps-script - 访问表单 ID 时抛出“不允许操作”异常
- symfony - 使用 rsync 命令将项目部署到远程服务器
- javascript - 如何检查浏览器是否支持'let'?
- debugging - Webpack 开发服务器:发布本地到远程的映射路径。在 IDE/Chrome 中加载输出/捆绑文件
- angular - 覆盖对话框不会在滚动时重新定位