cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: problem with empty files (ftp downloading on win32)

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Sun, 9 Dec 2001 10:27:05 +0100 (MET)

On Fri, 7 Dec 2001, James Brannan wrote:

> The curl documentation doesnt seem to be much help on win32 issues....
> (I'm using the latest curl version)

I'm vagely aware of that. I'm welcoming all sorts of contributions that
enhance this situation.

> *** The problem is in a class I call FTPWrapper class , I have a download
> method and an upload method. The upload method seems to work fine, but
> the download method creates empty files on the client with the exception
> of the last file.

Uh. That sounds weird. Can you switch on CURLOPT_VERBOSE and show us a
protocol dump?

> (I am calling download in a loop passing a new file path and name to
> download each time - only the last loop returns a file with content - but
> when I step through the code they ALL return content?????)

That sounds even more weird! ;-/

> I suspect its something to do with the curl handle - but I cant make
> heads or tails of the documentation on this - I pretty much followed the
> example simpleget.c code exactly.

Just one reflection on your code: try to keep the same curl handle aroud for
more transfers. You'll re-use the same connection that way.

> Anyone know the problem?

I'm afraid not. BTW, is this libcurl 7.9.2 running?

-- 
    Daniel Stenberg -- curl groks URLs -- http://curl.haxx.se/
Received on 2001-12-09