jinleileiking
jinleileiking

Reputation: 247

How to download a url whith libcurl and donot unzip it

By default, libcurl will download a url, if the url is gzipped (content-type: gzip), libcurl will unzip it,

Is it possible that let libcurl do not unzip it?

Upvotes: 0

Views: 80

Answers (1)

Daniel Stenberg
Daniel Stenberg

Reputation: 58024

No, libcurl will not by default decompress a response body that is sent compressed. It would only do that automatically if you set CURLOPT_ACCEPT_ENCODING accordingly.

The default behavior by libcurl is to deliver the data to the application exactly and unmodified, as it was sent by the server.

Upvotes: 1

Related Questions