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 B41C0178C5 for ; Wed, 8 Oct 2014 14:29:59 +0000 (UTC) Received: (qmail 24593 invoked by uid 500); 8 Oct 2014 14:29:59 -0000 Delivered-To: apmail-camel-commits-archive@camel.apache.org Received: (qmail 24446 invoked by uid 500); 8 Oct 2014 14:29:59 -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 24332 invoked by uid 99); 8 Oct 2014 14:29:59 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 08 Oct 2014 14:29:59 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 3E4D4923836; Wed, 8 Oct 2014 14:29:59 +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: Wed, 08 Oct 2014 14:29:59 -0000 Message-Id: <8dd6237857fa468b8255b103d5101fc0@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [1/4] git commit: CAMEL-7894 Fixed the encoder exception after sending a message with null body Repository: camel Updated Branches: refs/heads/master a0a1fddd6 -> 399153be9 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/0a7acc94 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/0a7acc94 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/0a7acc94 Branch: refs/heads/master Commit: 0a7acc94b788435cf8c3f277984e13a20c4ee438 Parents: a0a1fdd Author: Willem Jiang Authored: Wed Oct 8 20:10:57 2014 +0800 Committer: Willem Jiang Committed: Wed Oct 8 20:14:05 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/0a7acc94/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/0a7acc94/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