Hi Martin,

I remember us having issues with an HttpClient upgrade and I think you are
hitting something that we solved in the latest Camel 4.18.4 release
camel_http_gzip_double_decompression_with_httpclient_5_6
<https://camel.apache.org/manual/camel-4x-upgrade-guide-4_18.html#_camel_http_gzip_double_decompression_with_httpclient_5_6>

Can you try upgrading to 4.18.4?

Federico

Il giorno gio 3 set 2026 alle ore 19:35 Martin Lichtin via users <
[email protected]> ha scritto:

> Wanted to ask about this situation with Camel Http Component deciding to
> gunzip the response (due to header Content-Encoding: gzip) when in fact
> the HttpClient already did that.
> Symptom is:
>
> java.util.zip.ZipException: Not in GZIP format
>          at
>
> java.base/java.util.zip.GZIPInputStream.readHeader(GZIPInputStream.java:176)
>          at
> java.base/java.util.zip.GZIPInputStream.<init>(GZIPInputStream.java:79)
>          at
> java.base/java.util.zip.GZIPInputStream.<init>(GZIPInputStream.java:91)
>          at
> org.apache.camel.support.GZIPHelper.uncompressGzip(GZIPHelper.java:41)
>          at
>
> org.apache.camel.component.http.HttpProducer.extractResponseBody(HttpProducer.java:543)
>          at
>
> org.apache.camel.component.http.HttpProducer.populateResponse(HttpProducer.java:363)
>          at
>
> org.apache.camel.component.http.HttpProducer.lambda$process$1(HttpProducer.java:266)
>          at
>
> org.apache.camel.component.http.HttpProducer.executeMethod(HttpProducer.java:500)
>          at
> org.apache.camel.component.http.HttpProducer.process(HttpProducer.java:253)
>
> Setting Exchange.SKIP_GZIP_ENCODING=true solves the issue, but it does
> seem like a crude workaround.
>
> I've seen a discussion where Httpclient maintainers say that one should
> exclusively look at HttpEntity to deduce the content encoding, not the
> header.
>
> Camel 4.18.2, Httpclient 5.6.4
>
> Thanks - Martin
>
>

Reply via email to