You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by js...@apache.org on 2007/08/24 08:01:40 UTC
svn commit: r569262 -
/activemq/camel/trunk/components/camel-http/src/main/java/org/apache/camel/component/http/HttpProducer.java
Author: jstrachan
Date: Thu Aug 23 23:01:40 2007
New Revision: 569262
URL: http://svn.apache.org/viewvc?rev=569262&view=rev
Log:
ensure that if no data is present in a message body, return null so that get will be used
Modified:
activemq/camel/trunk/components/camel-http/src/main/java/org/apache/camel/component/http/HttpProducer.java
Modified: activemq/camel/trunk/components/camel-http/src/main/java/org/apache/camel/component/http/HttpProducer.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-http/src/main/java/org/apache/camel/component/http/HttpProducer.java?rev=569262&r1=569261&r2=569262&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-http/src/main/java/org/apache/camel/component/http/HttpProducer.java (original)
+++ activemq/camel/trunk/components/camel-http/src/main/java/org/apache/camel/component/http/HttpProducer.java Thu Aug 23 23:01:40 2007
@@ -78,6 +78,9 @@
RequestEntity entity = in.getBody(RequestEntity.class);
if (entity == null) {
byte[] data = in.getBody(byte[].class);
+ if (data == null) {
+ return null;
+ }
String contentType = in.getHeader("Content-Type", String.class);
if (contentType != null) {
return new ByteArrayRequestEntity(data, contentType);