On Wed, Jan 05, 2011 at 06:59:33PM +0100, Felix E. Klee wrote:
> On Wed, Jan 5, 2011 at 6:52 PM, Felix E. Klee <[email protected]> wrote:
> > I'd like to instruct libcurl to *not* decompress compressed responses.
> > Is this possible?
> 
> Just a quick idea:
> 
> * CURLOPT_ENCODING: NULL
> 
> * CURLOPT_HTTPHEADER: function that sets Accept-Encoding to
>   "gzip,deflate"
> 
> * CURLOPT_HEADERFUNCTION: function that reads Content-Encoding
> 
> Is that the way to go?

That should work fine.

> PS: I want to store the respons in a database, and leaving it
> uncompressed should increase performance and safe space.

Presumably, you're already taking care of this but not all servers or URLs
support compression.

>>> Dan
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html

Reply via email to