cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re:httpput.c

From: Parvinder Singh Arora <psarora_at_gmail.com>
Date: Mon, 10 Jul 2006 17:59:29 -0400

On Fri, 30 Jun 2006, Parvinder Singh Arora wrote:

*>> I would advice that you verify that you pass in the *
*>> correct *
*>> data size to the option for file size. *

*> I am not doing anything to set the file size *

>Yes you do, as otherwise libcurl won't tell the server about any size. And
>since you claim you use httpput.c unmodified I know you are:

> curl_easy_setopt(curl, CURLOPT_INFILESIZE_LARGE, file_info.st_size);
>... and you should make sure the data to pass in is either a curl_off_t
sized
>number, or you should switch and use CURLOPT_INFILESIZE and pass a long
> instead.

Thanks , this worked.
Next question :
In this particular example i can see a callback function registered to read
from file, the function also takes the size parameter, which determines how
much data (in terms of bytes) need to be read. How is the value determined
for reading a particular file, is it configurable based upon the size of the
file ?

-- 
~Parvinder
"Consider calling it a challenge rather than calling it a crisis."
Received on 2006-07-11