cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Headerinfo "Content-Encoding"

From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Thu, 8 Dec 2005 09:57:53 -0800

On Thu, Dec 08, 2005 at 10:05:41AM -0600, Kenneth Andresen wrote:
> Hello all,
>
> I am passing curl_setopt($ch, CURLOPT_ENCODING, "gzip,deflate,compress");
> The gzipped content does get compressed and expanded correctly,

But if some server were to send you "compress" compressed data, it wouldn't
be expanded properly because libcurl doesn't know about compress. Unless
you're doing something exotic, you're best off setting CURLOPT_ENCODING
to the empty string "" which tells libcurl to request all the encodings it
knows about.

> but how can I get info on the Content-Encoding used?

You can use use a header callback.

>>> Dan

-- 
http://www.MoveAnnouncer.com              The web change of address service
          Let webmasters know that your web site has moved
Received on 2005-12-08