You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by lb...@apache.org on 2019/09/04 15:17:52 UTC
[camel-k-runtime] branch master updated: camel-k-native-http:
improve response body handler
This is an automated email from the ASF dual-hosted git repository.
lburgazzoli pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel-k-runtime.git
The following commit(s) were added to refs/heads/master by this push:
new 09559d4 camel-k-native-http: improve response body handler
09559d4 is described below
commit 09559d49ef26509cac45a9ca84accfe64fce3a77
Author: lburgazzoli <lb...@gmail.com>
AuthorDate: Wed Sep 4 17:17:39 2019 +0200
camel-k-native-http: improve response body handler
---
.../org/apache/camel/component/knative/http/KnativeHttpProducer.java | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/camel-knative-http/src/main/java/org/apache/camel/component/knative/http/KnativeHttpProducer.java b/camel-knative-http/src/main/java/org/apache/camel/component/knative/http/KnativeHttpProducer.java
index c902841..23227aa 100644
--- a/camel-knative-http/src/main/java/org/apache/camel/component/knative/http/KnativeHttpProducer.java
+++ b/camel-knative-http/src/main/java/org/apache/camel/component/knative/http/KnativeHttpProducer.java
@@ -103,7 +103,9 @@ public class KnativeHttpProducer extends DefaultAsyncProducer {
}
}
- answer.setBody(result.body().getBytes());
+ if (result.body() != null){
+ answer.setBody(result.body().getBytes());
+ }
if (result.statusCode() < 200 || result.statusCode() >= 300) {
String exceptionMessage = String.format(