Jetty configuration - requestHeaderSize in camel-cxf
Issue
- We are running into a problem with a CXF endpoint that receives large headers.
The setup is:- jboss-fuse 6.1.0
- An osgi (blueprint) bundle with the following configuration:
<cxf:rsServer id="someEndpoint" address="http://localhost:8080/domain/test/link" serviceClass="com.redhat.ServiceEndpoint" ></cxf:rsServer>
- The error we get with large headers is
HTTP 413 - FULL.
In the logs:
2015-06-11 10:33:43,202 | WARN | tp2098740307-177 | HttpParser | ? ? | 93 - org.eclipse.jetty.aggregate.jetty-all-server - 8.1.14.v20131031 | HttpParser Full for SCEP@733a331{l(/0:0:0:0:0:0:0:1:49339)<->r(/0:0:0:0:0:0:0:1:8080),s=1,open=true,ishut=false,oshut=false,rb=false,wb=false,w=true,i=0r}-{AsyncHttpConnection@767e3d2c,g=HttpGenerator{s=0,h=-1,b=-1,c=-1},p=HttpParser{s=-1,l=6002,c=-3},r=0}
- We know this could be solved by setting the
requestHeaderSizeproperty on the connector (jetty). We tried different settings in the blueprint.xml (httpj:engine, httpj:connector, etc.) but the setting is not used when the buffer is constructed.
We debugged the Fuse runtime and set the property manually in theSelectChannelSelector._buffers._headerSizevariable. The headers are then correctly parsed.
Currently, we try to do this in blueprint.xml as follows (note: this doesn't work):
<httpj:engine-factory bus="cxf">
<httpj:engine port="8080">
<httpj:connector>
<bean class="org.eclipse.jetty.server.nio.SelectChannelConnector">
<property name="port">8080</property>
<property name="requestHeaderSize" value="80000"></property>
<property name="requestBufferSize" value="80000"></property>
</bean>
</httpj:connector>
</httpj:engine>
</httpj:engine-factory>
- Can you tell me where to configure the
requestHeaderSizefor the jetty instance used by CXF ?
Environment
- Red Hat JBoss Fuse
- 6.x
- Apache CXF
- Jetty
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
