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.
Re: Applying decompression by default when content-encoding header is set
- Contemporary messages sorted: [ by date ] [ by thread ] [ by subject ] [ by author ] [ by messages with attachments ]
From: Dan Fandrich via curl-users <curl-users_at_cool.haxx.se>
Date: Thu, 17 Jun 2021 15:11:11 -0700
On Thu, Jun 17, 2021 at 09:56:47PM +0200, Marcus Hoffmann via curl-users wrote:
> 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?
Enabling it automatically probably would have been a good default at the start,
but the current behaviour has been that way for over 10 years so changing it
now likely means breaking all kinds of scripts. You can always enable it by
default in your .curlrc file.
Dan
-----------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-users
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2021-06-18
Date: Thu, 17 Jun 2021 15:11:11 -0700
On Thu, Jun 17, 2021 at 09:56:47PM +0200, Marcus Hoffmann via curl-users wrote:
> 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?
Enabling it automatically probably would have been a good default at the start,
but the current behaviour has been that way for over 10 years so changing it
now likely means breaking all kinds of scripts. You can always enable it by
default in your .curlrc file.
Dan
-----------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-users
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2021-06-18