Return-Path: X-Original-To: apmail-camel-commits-archive@www.apache.org Delivered-To: apmail-camel-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 31FBB17867 for ; Thu, 9 Oct 2014 02:34:04 +0000 (UTC) Received: (qmail 72334 invoked by uid 500); 9 Oct 2014 02:34:04 -0000 Delivered-To: apmail-camel-commits-archive@camel.apache.org Received: (qmail 72184 invoked by uid 500); 9 Oct 2014 02:34:04 -0000 Mailing-List: contact commits-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list commits@camel.apache.org Received: (qmail 72069 invoked by uid 99); 9 Oct 2014 02:34:04 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 09 Oct 2014 02:34:04 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id AE62198E051; Thu, 9 Oct 2014 02:34:03 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: ningjiang@apache.org To: commits@camel.apache.org Date: Thu, 09 Oct 2014 02:34:03 -0000 Message-Id: <018abef722aa45ab8e0345666f87cdbc@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [1/7] git commit: CAMEL-7894 Fixed the encoder exception after sending a message with null body 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 Authored: Wed Oct 8 20:10:57 2014 +0800 Committer: Willem Jiang 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