Is there any way to get curl to decompress a response without sending the Accept-encoding headers in the request?
I\'m trying to debug an issue where the order of th
curl --compressed http://example.com
requests gzipped-compressed data and uncompresses it before writing to disk.
Probably the easiest thing to do is just use gunzip
to do it:
curl -sH 'Accept-encoding: gzip' http://example.com/ | gunzip -
Or there's also --compressed
, which curl
will decompress (I believe) since it knows the response is compressed. But, not sure if that meets your needs.