curl / Mailing Lists / curl-users / 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.

Applying decompression by default when content-encoding header is set

From: Marcus Hoffmann via curl-users <curl-users_at_cool.haxx.se>
Date: Thu, 17 Jun 2021 21:56:47 +0200

Hi,

today I interacted with an API that applied gzip encoding by default to
responses, which after reading
https://datatracker.ietf.org/doc/html/rfc7231#section-5.3.4 I think is
valid behaviour.

I was surprised that curl didn't decompress the response automatically
without adding the `--compressed` flag.

That was easy enough to find in the man page, but is there any reason
for curl not acting upon the `content-encoding` header automatically?

Best,
Marcus
-----------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-users
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2021-06-17