cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: SFTP "File already completely downloaded" but the file is empty

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Tue, 3 Apr 2012 23:34:39 +0200 (CEST)

On Mon, 26 Mar 2012, NEDJARI Hafed wrote:

> With libcurl 7.23.1 and libssh2 1.3.0

...

> The log "* file already completely downloadedl" is displayed by libcurl when
> the function libssh2_sftp_stat_ex returns an attrs.filesize to 0 (zero). It
> seems that the stat function is not supported by the GXS server.

Do you _know_ this or do you guess this is the reason? The SSH_FXP_FSTAT
packet type is a fundamental piece of SFTP and it seems *really* odd to me
that any server claiming to support SFTP would not support it.

I think there's a serious risk the bug is different.

> IMPORTANT : this case has already been reported to you :
> http://curl.haxx.se/mail/archive-2009-01/0114.html

... on a very early libssh2 version and the reporter didn't respond to follow
up. Unfortunately such "bug reports" are left behind to die.

> Are you agree with our possible explanation ?

I would like to be sure first.

But looking at the libcurl code, it actually tries to "survive" even if
libssh2_sftp_stat_ex() returns an error and the size is unknown. Can you
figure out what goes wrong and what we can do about it?

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2012-04-03