On 07-Jul-22 03:56, Wolf Vollprecht via curl-library wrote:
Hi all,

I have some data that I am downloading where I know that it is gzip-encoded. 
However, the server does not respond with the correct header (and I don’t have 
control over it). I was wondering if there is a way to either “manually” append 
the proper Content-Encoding header to the response or force libcurl to encode 
the response with gzip?

Best,

Wolf

I assume you mean "decode", not "encode".  After the mandatory lecture about not tolerating broken servers...

For the command line:

    curl https://foo.example.com/bar | gunzip > data

If you are using libcurl, depending on your requirements see zlib (libz) with CURLOPT_WRITEFUNCTION or popen() gunzip (or gzip -d).


Timothe Litt
ACM Distinguished Engineer
--------------------------
This communication may not represent the ACM or my employer's views,
if any, on the matters discussed.


Attachment: OpenPGP_signature
Description: OpenPGP digital signature

-- 
Unsubscribe: https://lists.haxx.se/listinfo/curl-library
Etiquette:   https://curl.se/mail/etiquette.html

Reply via email to