curl-library
Re: libcurl sftp support and quote
Date: Tue, 18 Mar 2008 10:05:47 -0700
On Tue, Mar 18, 2008 at 04:16:41PM +0100, Vincent Le Normand wrote:
> First of all, thank you for this great library. I use it for FTP, and it works
> great.
>
> I am currently trying to add SFTP support for my application. However, it
> doesn't work.
>
> My application needs to use both quote to create directory or remove file. When
> using this quote command for FTP with libcurl.framework 7.18.0 and libssh2 0.18
> on Mac OS X, i have a really strange behaviour: It looks like that libcurl is
> stuck in an infinite loop, trying to send the quote command forever.
>
> I've build a small too reproducing the issue:
>
> #include <curl/curl.h>
>
> int main (int argc, const char * argv[]) {
> CURL * my_curl_easy_handle = curl_easy_init();
> curl_easy_setopt(my_curl_easy_handle,CURLOPT_URL,"sftp://xxx//Volumes/Tests/
> Test%20SSH/");
> curl_easy_setopt(my_curl_easy_handle,CURLOPT_USERPWD,"xxx:xxx");
> curl_easy_setopt(my_curl_easy_handle,CURLOPT_VERBOSE,TRUE);
> void *headerlist=NULL;
> headerlist = curl_slist_append(headerlist, "mkd /Volumes/Tests/Test SSH/Test");
'mkd' isn't a valid quote command for SFTP--you want 'mkdir' instead. But
you're right--it turns out that curl loops forever when given an invalid
quote command. I've checked in a disabled test 626 that shows this (I don't
think I'll be able to debug it right now, though).
>>> Dan
-- http://www.MoveAnnouncer.com The web change of address service Let webmasters know that your web site has movedReceived on 2008-03-18