camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ningji...@apache.org
Subject [4/4] git commit: CAMEL-7848 Need to added the encode and decode after the http codec in camel-netty4-http
Date Fri, 24 Oct 2014 07:00:30 GMT
CAMEL-7848 Need to added the encode and decode after the http codec in camel-netty4-http


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

Branch: refs/heads/master
Commit: 5f23cb4d24cf082d450b7925653953cb546e65c8
Parents: 2002204
Author: Willem Jiang <willem.jiang@gmail.com>
Authored: Fri Oct 24 14:33:05 2014 +0800
Committer: Willem Jiang <willem.jiang@gmail.com>
Committed: Fri Oct 24 14:33:05 2014 +0800

----------------------------------------------------------------------
 components/camel-netty4-http/pom.xml                  | 14 ++++++++++----
 .../netty4/http/HttpClientInitializerFactory.java     |  4 ++--
 .../netty4/http/HttpServerInitializerFactory.java     | 10 ++++------
 parent/pom.xml                                        |  1 +
 4 files changed, 17 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/5f23cb4d/components/camel-netty4-http/pom.xml
----------------------------------------------------------------------
diff --git a/components/camel-netty4-http/pom.xml b/components/camel-netty4-http/pom.xml
index 4d607c9..df5c2ac 100644
--- a/components/camel-netty4-http/pom.xml
+++ b/components/camel-netty4-http/pom.xml
@@ -41,13 +41,19 @@
             <artifactId>camel-netty4</artifactId>
 		</dependency>
 		<dependency>
-             <groupId>io.netty</groupId>
-             <artifactId>netty-codec-http</artifactId>
-             <version>${netty-version}</version>
+            <groupId>io.netty</groupId>
+            <artifactId>netty-codec-http</artifactId>
+            <version>${netty-version}</version>
         </dependency>
-
+        
 		<!-- testing -->
 		<dependency>
+            <groupId>com.jcraft</groupId>
+            <artifactId>jzlib</artifactId>
+            <version>${jzlib-version}</version>
+            <scope>test</scope>
+        </dependency>
+		<dependency>
 			<groupId>org.apache.camel</groupId>
 			<artifactId>camel-test-spring</artifactId>
 			<scope>test</scope>

http://git-wip-us.apache.org/repos/asf/camel/blob/5f23cb4d/components/camel-netty4-http/src/main/java/org/apache/camel/component/netty4/http/HttpClientInitializerFactory.java
----------------------------------------------------------------------
diff --git a/components/camel-netty4-http/src/main/java/org/apache/camel/component/netty4/http/HttpClientInitializerFactory.java
b/components/camel-netty4-http/src/main/java/org/apache/camel/component/netty4/http/HttpClientInitializerFactory.java
index b19fcf1..bda2f9e 100644
--- a/components/camel-netty4-http/src/main/java/org/apache/camel/component/netty4/http/HttpClientInitializerFactory.java
+++ b/components/camel-netty4-http/src/main/java/org/apache/camel/component/netty4/http/HttpClientInitializerFactory.java
@@ -85,6 +85,8 @@ public class HttpClientInitializerFactory extends ClientInitializerFactory
{
             pipeline.addLast("ssl", sslHandler);
         }
         
+        pipeline.addLast("http", new HttpClientCodec());
+        
         List<ChannelHandler> encoders = producer.getConfiguration().getEncoders();
         for (int x = 0; x < encoders.size(); x++) {
             ChannelHandler encoder = encoders.get(x);
@@ -104,8 +106,6 @@ public class HttpClientInitializerFactory extends ClientInitializerFactory
{
             }
             pipeline.addLast("decoder-" + x, decoder);
         }
-        
-        pipeline.addLast("http", new HttpClientCodec());
         pipeline.addLast("aggregator", new HttpObjectAggregator(configuration.getChunkedMaxContentLength()));
 
         if (producer.getConfiguration().getRequestTimeout() > 0) {

http://git-wip-us.apache.org/repos/asf/camel/blob/5f23cb4d/components/camel-netty4-http/src/main/java/org/apache/camel/component/netty4/http/HttpServerInitializerFactory.java
----------------------------------------------------------------------
diff --git a/components/camel-netty4-http/src/main/java/org/apache/camel/component/netty4/http/HttpServerInitializerFactory.java
b/components/camel-netty4-http/src/main/java/org/apache/camel/component/netty4/http/HttpServerInitializerFactory.java
index 6d61945..c7f40ea 100644
--- a/components/camel-netty4-http/src/main/java/org/apache/camel/component/netty4/http/HttpServerInitializerFactory.java
+++ b/components/camel-netty4-http/src/main/java/org/apache/camel/component/netty4/http/HttpServerInitializerFactory.java
@@ -87,6 +87,7 @@ public class HttpServerInitializerFactory extends ServerInitializerFactory
{
             pipeline.addLast("ssl", sslHandler);
         }
        
+        pipeline.addLast("decoder", new HttpRequestDecoder());
         List<ChannelHandler> decoders = consumer.getConfiguration().getDecoders();
         for (int x = 0; x < decoders.size(); x++) {
             ChannelHandler decoder = decoders.get(x);
@@ -96,7 +97,9 @@ public class HttpServerInitializerFactory extends ServerInitializerFactory
{
             }
             pipeline.addLast("decoder-" + x, decoder);
         }
-        
+        pipeline.addLast("aggregator", new HttpObjectAggregator(configuration.getChunkedMaxContentLength()));
+
+        pipeline.addLast("encoder", new HttpResponseEncoder());
         List<ChannelHandler> encoders = consumer.getConfiguration().getEncoders();
         for (int x = 0; x < encoders.size(); x++) {
             ChannelHandler encoder = encoders.get(x);
@@ -106,11 +109,6 @@ public class HttpServerInitializerFactory extends ServerInitializerFactory
{
             }
             pipeline.addLast("encoder-" + x, encoder);
         }
-
-        pipeline.addLast("decoder", new HttpRequestDecoder());
-        pipeline.addLast("aggregator", new HttpObjectAggregator(configuration.getChunkedMaxContentLength()));
-
-        pipeline.addLast("encoder", new HttpResponseEncoder());
         if (supportCompressed()) {
             pipeline.addLast("deflater", new HttpContentCompressor());
         }

http://git-wip-us.apache.org/repos/asf/camel/blob/5f23cb4d/parent/pom.xml
----------------------------------------------------------------------
diff --git a/parent/pom.xml b/parent/pom.xml
index 3177bc5..3e3098d 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -276,6 +276,7 @@
     <junit-bundle-version>4.11_1</junit-bundle-version>
     <junit-version>4.11</junit-version>
     <jython-version>2.5.3</jython-version>
+    <jzlib-version>1.1.3</jzlib-version>
     <kafka-version>0.8.1</kafka-version>
     <kafka-bundle-version>0.8.1_1</kafka-bundle-version>
     <karaf-version>2.4.0</karaf-version>


Mime
View raw message