curl-library
Re: Headerinfo "Content-Encoding"
Date: Thu, 08 Dec 2005 15:06:46 -0600
Hello Dan,
Thank you for your advice! I will use a empty string with
CURLOPT_ENCODING then!
I have btw. noticed that in a shell command like bash, the encoding is
listed when using Dump header:
curl --compress remoteurl -o localurl -D dumpheader.txt
I thus asume PHP's use of Curl also get the entire header somewhere(?),
if I can't get the encoding directly, are there any other ways to get
the full response header within PHP?
Dan Fandrich wrote:
>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
>>>>
>>>>
Received on 2005-12-08