CAMEL-8976: Add maxHeadersSize option to configure the total number of bytes the http headers must be for the server to accept.
Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/405d55d8 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/405d55d8 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/405d55d8 Branch: refs/heads/master Commit: 405d55d8c536d5f6de88c62c57e771f203118f11 Parents: 0ca892f Author: Claus Ibsen <davscl...@apache.org> Authored: Thu Jul 16 16:00:44 2015 +0200 Committer: Claus Ibsen <davscl...@apache.org> Committed: Thu Jul 16 16:00:44 2015 +0200 ---------------------------------------------------------------------- .../component/netty/http/NettyHttpConfiguration.java | 2 +- .../netty4/http/HttpServerSharedInitializerFactory.java | 2 +- .../component/netty4/http/NettyHttpConfiguration.java | 2 +- .../http/NettySharedHttpServerBootstrapConfiguration.java | 10 +++++----- 4 files changed, 8 insertions(+), 8 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/camel/blob/405d55d8/components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/NettyHttpConfiguration.java ---------------------------------------------------------------------- diff --git a/components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/NettyHttpConfiguration.java b/components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/NettyHttpConfiguration.java index 7847d96..4e103d7 100644 --- a/components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/NettyHttpConfiguration.java +++ b/components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/NettyHttpConfiguration.java @@ -56,7 +56,7 @@ public class NettyHttpConfiguration extends NettyConfiguration { private boolean send503whenSuspended = true; @UriParam(defaultValue = "" + 1024 * 1024) private int chunkedMaxContentLength = 1024 * 1024; - @UriParam(defaultValue = "8192") + @UriParam(label = "consumer", defaultValue = "8192") private int maxHeaderSize = 8192; public NettyHttpConfiguration() { http://git-wip-us.apache.org/repos/asf/camel/blob/405d55d8/components/camel-netty4-http/src/main/java/org/apache/camel/component/netty4/http/HttpServerSharedInitializerFactory.java ---------------------------------------------------------------------- diff --git a/components/camel-netty4-http/src/main/java/org/apache/camel/component/netty4/http/HttpServerSharedInitializerFactory.java b/components/camel-netty4-http/src/main/java/org/apache/camel/component/netty4/http/HttpServerSharedInitializerFactory.java index 63dc729..71e9129 100644 --- a/components/camel-netty4-http/src/main/java/org/apache/camel/component/netty4/http/HttpServerSharedInitializerFactory.java +++ b/components/camel-netty4-http/src/main/java/org/apache/camel/component/netty4/http/HttpServerSharedInitializerFactory.java @@ -82,7 +82,7 @@ public class HttpServerSharedInitializerFactory extends HttpServerInitializerFac pipeline.addLast("ssl", sslHandler); } - pipeline.addLast("decoder", new HttpRequestDecoder(409, configuration.getMaxHeadersSize(), 8192)); + pipeline.addLast("decoder", new HttpRequestDecoder(409, configuration.getMaxHeaderSize(), 8192)); if (configuration.isChunked()) { pipeline.addLast("aggregator", new HttpObjectAggregator(configuration.getChunkedMaxContentLength())); } http://git-wip-us.apache.org/repos/asf/camel/blob/405d55d8/components/camel-netty4-http/src/main/java/org/apache/camel/component/netty4/http/NettyHttpConfiguration.java ---------------------------------------------------------------------- diff --git a/components/camel-netty4-http/src/main/java/org/apache/camel/component/netty4/http/NettyHttpConfiguration.java b/components/camel-netty4-http/src/main/java/org/apache/camel/component/netty4/http/NettyHttpConfiguration.java index bf0eba6..ff80318 100644 --- a/components/camel-netty4-http/src/main/java/org/apache/camel/component/netty4/http/NettyHttpConfiguration.java +++ b/components/camel-netty4-http/src/main/java/org/apache/camel/component/netty4/http/NettyHttpConfiguration.java @@ -55,7 +55,7 @@ public class NettyHttpConfiguration extends NettyConfiguration { private boolean send503whenSuspended = true; @UriParam(defaultValue = "" + 1024 * 1024) private int chunkedMaxContentLength = 1024 * 1024; - @UriParam(defaultValue = "8192") + @UriParam(label = "consumer", defaultValue = "8192") private int maxHeaderSize = 8192; public NettyHttpConfiguration() { http://git-wip-us.apache.org/repos/asf/camel/blob/405d55d8/components/camel-netty4-http/src/main/java/org/apache/camel/component/netty4/http/NettySharedHttpServerBootstrapConfiguration.java ---------------------------------------------------------------------- diff --git a/components/camel-netty4-http/src/main/java/org/apache/camel/component/netty4/http/NettySharedHttpServerBootstrapConfiguration.java b/components/camel-netty4-http/src/main/java/org/apache/camel/component/netty4/http/NettySharedHttpServerBootstrapConfiguration.java index 3161036..f8a70ed 100644 --- a/components/camel-netty4-http/src/main/java/org/apache/camel/component/netty4/http/NettySharedHttpServerBootstrapConfiguration.java +++ b/components/camel-netty4-http/src/main/java/org/apache/camel/component/netty4/http/NettySharedHttpServerBootstrapConfiguration.java @@ -23,7 +23,7 @@ public class NettySharedHttpServerBootstrapConfiguration extends NettyServerBoot private int chunkedMaxContentLength = 1024 * 1024; private boolean chunked = true; private boolean compression; - private int maxHeadersSize = 8192; + private int maxHeaderSize = 8192; public boolean isChunked() { return chunked; @@ -49,11 +49,11 @@ public class NettySharedHttpServerBootstrapConfiguration extends NettyServerBoot this.compression = compression; } - public int getMaxHeadersSize() { - return maxHeadersSize; + public int getMaxHeaderSize() { + return maxHeaderSize; } - public void setMaxHeadersSize(int maxHeadersSize) { - this.maxHeadersSize = maxHeadersSize; + public void setMaxHeaderSize(int maxHeaderSize) { + this.maxHeaderSize = maxHeaderSize; } }