camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ningji...@apache.org
Subject [1/7] git commit: CAMEL-7894 Fixed the encoder exception after sending a message with null body
Date Thu, 09 Oct 2014 02:34:03 GMT
Repository: camel
Updated Branches:
  refs/heads/camel-2.12.x ce4a93943 -> 92a87937f
  refs/heads/camel-2.13.x a5eb8c083 -> 3580582d4
  refs/heads/camel-2.14.x b068aa8d5 -> 89c2cbbc6


CAMEL-7894 Fixed the encoder exception after sending a message with null body


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

Branch: refs/heads/camel-2.14.x
Commit: f31e9ac52210dd1773bfa01a3231fff9b0ca981a
Parents: b068aa8
Author: Willem Jiang <willem.jiang@gmail.com>
Authored: Wed Oct 8 20:10:57 2014 +0800
Committer: Willem Jiang <willem.jiang@gmail.com>
Committed: Thu Oct 9 10:31:12 2014 +0800

----------------------------------------------------------------------
 .../camel/component/netty4/http/DefaultNettyHttpBinding.java      | 3 +--
 .../component/netty4/http/NettyHttpProducerSimpleGetTest.java     | 3 +++
 2 files changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/f31e9ac5/components/camel-netty4-http/src/main/java/org/apache/camel/component/netty4/http/DefaultNettyHttpBinding.java
----------------------------------------------------------------------
diff --git a/components/camel-netty4-http/src/main/java/org/apache/camel/component/netty4/http/DefaultNettyHttpBinding.java
b/components/camel-netty4-http/src/main/java/org/apache/camel/component/netty4/http/DefaultNettyHttpBinding.java
index 42e4bec..dc1c8d3 100644
--- a/components/camel-netty4-http/src/main/java/org/apache/camel/component/netty4/http/DefaultNettyHttpBinding.java
+++ b/components/camel-netty4-http/src/main/java/org/apache/camel/component/netty4/http/DefaultNettyHttpBinding.java
@@ -32,7 +32,6 @@ import java.util.Map;
 import io.netty.buffer.ByteBuf;
 import io.netty.handler.codec.http.DefaultFullHttpRequest;
 import io.netty.handler.codec.http.DefaultFullHttpResponse;
-import io.netty.handler.codec.http.DefaultHttpRequest;
 import io.netty.handler.codec.http.FullHttpRequest;
 import io.netty.handler.codec.http.FullHttpResponse;
 import io.netty.handler.codec.http.HttpHeaders;
@@ -434,7 +433,7 @@ public class DefaultNettyHttpBinding implements NettyHttpBinding, Cloneable
{
         }
 
         // just assume GET for now, we will later change that to the actual method to use
-        HttpRequest request = new DefaultHttpRequest(HttpVersion.HTTP_1_1, HttpMethod.GET,
uri);
+        HttpRequest request = new DefaultFullHttpRequest(HttpVersion.HTTP_1_1, HttpMethod.GET,
uri);
         
         Object body = message.getBody();
         if (body != null) {

http://git-wip-us.apache.org/repos/asf/camel/blob/f31e9ac5/components/camel-netty4-http/src/test/java/org/apache/camel/component/netty4/http/NettyHttpProducerSimpleGetTest.java
----------------------------------------------------------------------
diff --git a/components/camel-netty4-http/src/test/java/org/apache/camel/component/netty4/http/NettyHttpProducerSimpleGetTest.java
b/components/camel-netty4-http/src/test/java/org/apache/camel/component/netty4/http/NettyHttpProducerSimpleGetTest.java
index a5b3f76..6ed9a7a 100644
--- a/components/camel-netty4-http/src/test/java/org/apache/camel/component/netty4/http/NettyHttpProducerSimpleGetTest.java
+++ b/components/camel-netty4-http/src/test/java/org/apache/camel/component/netty4/http/NettyHttpProducerSimpleGetTest.java
@@ -30,6 +30,9 @@ public class NettyHttpProducerSimpleGetTest extends BaseNettyTest {
         assertEquals("Bye World", out);
 
         assertMockEndpointsSatisfied();
+        
+        out = template.requestBody("netty4-http:http://localhost:{{port}}/foo", null, String.class);
+        assertEquals("Bye World", out);
     }
 
     @Test


Mime
View raw message