cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Curl might not be decompressing the body if the server sends it compressed without being asked to do so

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Fri, 1 Jul 2016 21:52:07 +0200 (CEST)

On Fri, 1 Jul 2016, Attila-Mihaly Balazs wrote:

> I can't reliably reproduce this, but I think that if the server sends the
> response compressed (ie. "Content-Encoding: gzip") without curl asking for
> this (ie. the "--compressed" flag was not specified), curl doesn't
> decompress the body.

Correct, and it never has. "Content-Encoding: gzip" is in fact just a signal
from the server that the data is compressed, it isn't telling the user-agent
to automatically decompress it - even if it has turned out to become that a
lot of the time...

So it is by design. Maybe we should reconsider that design decision...

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
List admin: https://cool.haxx.se/list/listinfo/curl-users
FAQ:        https://curl.haxx.se/docs/faq.html
Etiquette:  https://curl.haxx.se/mail/etiquette.html
Received on 2016-07-01