cURL / Mailing Lists / curl-library / Single Mail

curl-library

Need urgend help to use libcurl to transfer zip file via FTP

From: <Hanmei.Zhang_at_t-systems.com>
Date: Mon, 21 Jun 2010 10:20:38 +0200

Hi all,

I need help urgently.
I wanted to transfer zip file using libcurl via FTP from UNIX to VMS.
Although I told libcurl to use binary mode, it seems that it did not
work, because the zip file was modified after the transfer. Some
carriage returns in the zip file were converted to line feeds, so that
the unzip tool could not unzip the file.

I did the transfer in the following way:

      ...
      curl_easy_setopt( curl, CURLOPT_CUSTOMREQUEST,"TYPE I" );
      res_g = curl_easy_perform( curl );

      curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST ,"RETR
test_zip.yyy");
      res = curl_easy_perform(curl);
      ...
I tried a lot of options to be set, such as CURLOPT_PROXY_TRANSFER_MODE,
CURLOPT_CRLF ... and so on. But without success.
Can anyone help me? Or can anyone give me some suggestions or hints?
Thank you very much!

Hanmei

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2010-06-21