cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: libcurl FTP - setting transfer type

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Thu, 27 Mar 2008 23:10:36 +0100 (CET)

On Thu, 27 Mar 2008, Alla Bogolubov wrote:

> The application transfers the files successfully. However, I was unable to
> set transfer type to A (ascii). When I set transfer type to A after NLST
> command and before the second call to curl_easy_perform() the application
> enters an endless loop setting TYPE A:

You're fighting against libcurl instead of with it... try the ;type=i/a
approach appended to the URL to set type. (Described in RFC1738 section 3.2.2)

> list = curl_slist_append(list, "CWD FTP");
> list = curl_slist_append(list, "PWD");

Don't do that. Use the correct URL instead! You'll only get yourself in
trouble otherwise.

-- 
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
Received on 2008-03-27