cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Remote file information using sftp

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Tue, 4 Jan 2011 23:49:13 +0100 (CET)

On Tue, 4 Jan 2011, Mele Giovanni wrote:

> I'm trying to get a remote file information, mainly size and modification
> date) using the curl library. All is working fine when connection on a
> normal ftp server, but as soon as I try to use an sftp server, I get no
> information about the remote file.

SFTP has basically nothing else in comon with FTP besides the fact that they
both run over TCP. Lots of libcurl code paths and logic are different between
those protocols.

> I'm using libcurl 7.21.3 compiled to enable sftp.

Your libssh2 version is also highly relevant.

> curl_easy_setopt(_guts->_curl, CURLOPT_FILETIME, 1);

I looked at the code right now and I can't see that we ever introduced support
for CURLOPT_FILETIME with SFTP. A bug!

It should be quite doable to support for SFTP, and I believe even for SCP.

You up to make a patch to make it happen?

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