You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by or...@apache.org on 2023/01/05 09:57:13 UTC
[camel] 05/12: (chores) camel-http: avoid risky unboxing
This is an automated email from the ASF dual-hosted git repository.
orpiske pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
commit dd814a1efe21ba3c51f60b90f2d8fe628f9de094
Author: Otavio Rodolfo Piske <an...@gmail.com>
AuthorDate: Wed Jan 4 17:50:15 2023 +0100
(chores) camel-http: avoid risky unboxing
---
.../src/main/java/org/apache/camel/component/http/HttpProducer.java | 3 ++-
1 file changed, 2 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 a2a2f7ef7e4..04aa2d8191d 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
@@ -483,7 +483,8 @@ public class HttpProducer extends DefaultProducer {
Header header = httpResponse.getFirstHeader(HttpConstants.CONTENT_ENCODING);
String contentEncoding = header != null ? header.getValue() : null;
- if (!exchange.getProperty(Exchange.SKIP_GZIP_ENCODING, Boolean.FALSE, Boolean.class)) {
+ final boolean gzipEncoding = exchange.getProperty(Exchange.SKIP_GZIP_ENCODING, Boolean.FALSE, Boolean.class);
+ if (!gzipEncoding) {
is = GZIPHelper.uncompressGzip(contentEncoding, is);
}
// Honor the character encoding