Re: How to identify that extensions are not supported on SFTP server? [libcurl]

2023-11-22 Thread Dan Fandrich via curl-library
On Wed, Nov 22, 2023 at 07:26:15PM +, Nimit Dhulekar via curl-library wrote:
> We have been using statvfs as a CURLOPT_QUOTE command via libcurl to identify
> whether the entry on the SFTP server is a file or folder. Is there any way to
> know in advance (preferably through libcurl) that a certain command is not
> supported on an SFTP server?

libssh2 just throws away the list of SFTP protocol extensions sent by the
server that would allow it (or clients) to know whether or not statvfs would
work or not.  I don't know how libssh deals with this info, but determining a
priori if statvfs will work using libssh2 would require changing libssh2 to
return this info to the client somehow, then writing a libssh2 program to query
that info before running curl, or somehow shoehorning that function into
libcurl (via curl_easy_getinfo() perhaps).

Dan
-- 
Unsubscribe: https://lists.haxx.se/mailman/listinfo/curl-library
Etiquette:   https://curl.se/mail/etiquette.html


How to identify that extensions are not supported on SFTP server? [libcurl]

2023-11-22 Thread Nimit Dhulekar via curl-library

Hi,
We found that SFTP servers hosted on Azure blob storage do not support the 
statvfs extension.

https://learn.microsoft.com/en-us/azure/storage/blobs/secure-file-transfer-protocol-known-issues#unsupported-operations

We have been using statvfs as a CURLOPT_QUOTE command via libcurl to identify 
whether the entry on the SFTP server is a file or folder. Is there any way to 
know in advance (preferably through libcurl) that a certain command is not 
supported on an SFTP server?

Thanks,
Nimit
-- 
Unsubscribe: https://lists.haxx.se/mailman/listinfo/curl-library
Etiquette:   https://curl.se/mail/etiquette.html