cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Réf. : Re: Crash of command line tool "curl. exe" with not so bogus parameters

From: Daniel Stenberg <daniel-curl_at_haxx.se>
Date: Thu, 20 Jan 2005 14:58:00 +0100 (CET)

On Thu, 20 Jan 2005, Philippe HAMEAU wrote:

> Curl_easy_perform returns : 18

And how big did you tell libcurl the file is?

> I just don't get why libcurl will try to read since it has already read the
> whole one-byte file.

liburl will always call the read callback until you return a zero to signal
end of data, it doesn't care about the set file size as a variable in that
loop.

In fact, when dealing with FTP the only thing libcurl uses the file size
knowledge for, is to compare if it sent the same number of bytes as the app
said the size of the file is. In your case, it seems you set a size different
than 1. (or you used the *_LARGE option without carefully making sure you pass
in a curl_off_t type argument, or similar).

-- 
      Daniel Stenberg -- http://curl.haxx.se -- http://daniel.haxx.se
       Dedicated custom curl help for hire: http://haxx.se/curl.html
Received on 2005-01-20