cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: CURLOPT_INFILESIZE and padded files

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Tue, 16 Jan 2007 23:31:57 +0100 (CET)

On Tue, 16 Jan 2007, Peter Seebach wrote:

> This works, but curl still reports error code 18, even though the uploaded
> file is precisely the same size as the encoded jpeg data, and appears to be
> correct.

libcurl returns 18 if it doesn't upload the same amount of data that you
initially told it you were gonna send.

> Is there some obvious and cheap way to tell curl that the file size I am
> specifying is not merely a suspicion, but is in fact the amount of data I
> want uploaded?

That's what the given size means. You tell libcurl about the size. libcurl
tells the server about the size to come. Then it transfers the data and you
deliver that amount of data. Everything is fine and dandy...

If not, then something is wrong somewhere.

-- 
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
Received on 2007-01-16