curl / Mailing Lists / curl-library / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

CURLOPT_ACCEPT_ENCODING not working (help)

From: Adrián Gimeno Balaguer via curl-library <>
Date: Thu, 4 Feb 2021 16:07:54 +0100



I’m using a self built libcurl shared library for embedded use in a C++ application. In the attempt of requesting it to automatically decompress response data from a remote server of interest by using a line like the following in my request setup:


curl_easy_setopt(mpCURL, CURLOPT_ACCEPT_ENCODING, "gzip");


The returned data seems to remain compressed. I enabled the CURLOPT_HEADER option and can see that the server returns positive Content-Lengths, with few non-human readable characters in the body content. To be clear, removing the CURLOPT_ACCEPT_ENCODING option doesn’t make any difference.


The libcurl library compilation is done in a custom automated CI/CD in the cloud which also compiles OpenSSL and ZLib as shared libraries in separate pipelines, with libcurl pipeline pulling from the master branch (from official libcurl’s repo) and a compilation script like the following:




I can see the following possible relevant build output lines (not contiguous) that may indicate ZLib gets correctly integrated:


Found ZLIB: /home/vsts/work/1/zlib/lib/ (found version "1.2.11")

Enabled features: SSL libz AsynchDNS alt-svc HTTPS-proxy


However, I’ve seen in the following answer: Looking at my generated libcurl headers, I can’t find any match for “HAVE_LIBZ” (neither in my build output).


What could I be doing wrong? Many thanks.


Best regards,



Received on 2021-02-04