cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: accepting/denying a http request based on content length header

From: Aleksandar Lazic <al-curllibrary_at_none.at>
Date: Mon, 4 Aug 2008 15:53:42 +0200

Dear Peter,

On Mon 04.08.2008 09:37, Peter Wilkes wrote:
>hello,

[snipp]

>would anyone be able to point me in the correct curl option to receive
>the header callback so i can build this functionality?

Maybe this can help:

###http://curl.haxx.se/libcurl/c/curl_easy_getinfo.html
.
.
CURLINFO_CONTENT_LENGTH_DOWNLOAD

Pass a pointer to a double to receive the content-length of the
download. This is the value read from the Content-Length: field.
.
.
###

and http://curl.haxx.se/lxr/source/docs/examples/getinfo.c change the
getinfo line to the correct values and try it ;-)

Hth

Aleks
Received on 2008-08-04