You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2021/02/18 14:18:22 UTC
[camel] branch camel-3.7.x updated: CAMEL-16233: Fix camel-http -
Optimize to avoid type convertion that would do deep checking.
This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch camel-3.7.x
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/camel-3.7.x by this push:
new 8c4c8a0 CAMEL-16233: Fix camel-http - Optimize to avoid type convertion that would do deep checking.
8c4c8a0 is described below
commit 8c4c8a008a516627ac7789b0e38bab21431dae94
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Thu Feb 18 15:17:56 2021 +0100
CAMEL-16233: Fix camel-http - Optimize to avoid type convertion that would do deep checking.
---
.../src/main/java/org/apache/camel/component/http/HttpProducer.java | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/components/camel-http/src/main/java/org/apache/camel/component/http/HttpProducer.java b/components/camel-http/src/main/java/org/apache/camel/component/http/HttpProducer.java
index 446e93d..1923822 100644
--- a/components/camel-http/src/main/java/org/apache/camel/component/http/HttpProducer.java
+++ b/components/camel-http/src/main/java/org/apache/camel/component/http/HttpProducer.java
@@ -547,7 +547,9 @@ public class HttpProducer extends DefaultProducer {
try {
if (body == null) {
return null;
- // special optimized for using these 3 type converters for common message payload types
+ } else if (body instanceof HttpEntity) {
+ answer = (HttpEntity) body;
+ // special optimized for using these 3 type converters for common message payload types
} else if (body instanceof byte[]) {
answer = HttpEntityConverter.toHttpEntity((byte[]) body, exchange);
} else if (body instanceof InputStream) {