Updated Branches:
  refs/heads/master 526222842 -> 6bc5a693c

camel-netty-http: Allow to configure chunked max content length on the netty 
http server.


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/87ccdd3f
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/87ccdd3f
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/87ccdd3f

Branch: refs/heads/master
Commit: 87ccdd3f047203fa7cb1531b333e75a8ee77807b
Parents: 5262228
Author: Claus Ibsen <davscl...@apache.org>
Authored: Thu Aug 1 15:14:04 2013 +0200
Committer: Claus Ibsen <davscl...@apache.org>
Committed: Thu Aug 1 15:14:04 2013 +0200

----------------------------------------------------------------------
 .../netty/http/HttpServerSharedPipelineFactory.java         | 2 +-
 .../http/NettySharedHttpServerBootstrapConfiguration.java   | 9 +++++++++
 2 files changed, 10 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/87ccdd3f/components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/HttpServerSharedPipelineFactory.java
----------------------------------------------------------------------
diff --git 
a/components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/HttpServerSharedPipelineFactory.java
 
b/components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/HttpServerSharedPipelineFactory.java
index daa896a..ea24704 100644
--- 
a/components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/HttpServerSharedPipelineFactory.java
+++ 
b/components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/HttpServerSharedPipelineFactory.java
@@ -82,7 +82,7 @@ public class HttpServerSharedPipelineFactory extends 
HttpServerPipelineFactory {
 
         pipeline.addLast("decoder", new HttpRequestDecoder());
         if (configuration.isChunked()) {
-            pipeline.addLast("aggregator", new HttpChunkAggregator(1048576));
+            pipeline.addLast("aggregator", new 
HttpChunkAggregator(configuration.getChunkedMaxContentLength()));
         }
         pipeline.addLast("encoder", new HttpResponseEncoder());
         if (configuration.isCompression()) {

http://git-wip-us.apache.org/repos/asf/camel/blob/87ccdd3f/components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/NettySharedHttpServerBootstrapConfiguration.java
----------------------------------------------------------------------
diff --git 
a/components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/NettySharedHttpServerBootstrapConfiguration.java
 
b/components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/NettySharedHttpServerBootstrapConfiguration.java
index 0e99996..cf785c4 100644
--- 
a/components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/NettySharedHttpServerBootstrapConfiguration.java
+++ 
b/components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/NettySharedHttpServerBootstrapConfiguration.java
@@ -20,6 +20,7 @@ import 
org.apache.camel.component.netty.NettyServerBootstrapConfiguration;
 
 public class NettySharedHttpServerBootstrapConfiguration extends 
NettyServerBootstrapConfiguration {
 
+    private int chunkedMaxContentLength = 1024 * 1024;
     private boolean chunked = true;
     private boolean compression;
 
@@ -31,6 +32,14 @@ public class NettySharedHttpServerBootstrapConfiguration 
extends NettyServerBoot
         this.chunked = chunked;
     }
 
+    public int getChunkedMaxContentLength() {
+        return chunkedMaxContentLength;
+    }
+
+    public void setChunkedMaxContentLength(int chunkedMaxContentLength) {
+        this.chunkedMaxContentLength = chunkedMaxContentLength;
+    }
+
     public boolean isCompression() {
         return compression;
     }

Reply via email to