cURL / Mailing Lists / curl-library / Single Mail

curl-library

Help needed: FTP download, duplicated CR (carriage return ), dup licated new_lines

From: David Szekeres <Szekeres_at_micks.de>
Date: Thu, 8 May 2003 18:36:50 +0200

Hello,

The problem:

I'm trying to download some small text files via FTP with libcurl.

The download succeeds, however the file size on the server DIFFERS from what
I get after the download.

After seeing the files resulted with a hex viewer, I see, that every CR
(carriage return) is being duplicated with the transfer.

I add to example files as attahcment.

I have already tried these settings:

        CURLOPT_CRLF:
        curl_easy_setopt(curl,CURLOPT_TRANSFERTEXT,1);
        curl_easy_setopt(curl,CURLOPT_TRANSFERTEXT,0);
        

        ASCII mode:
        curl_easy_setopt(curl,CURLOPT_TRANSFERTEXT,1);

        Binary mode:
        curl_easy_setopt(curl,CURLOPT_TRANSFERTEXT,0);
        .

None of them worked.

Now I don't know, how I could make it. I really don't want to use string
postprocessing after the download.

 I guess FTP download is still a common thing. I guess I'm not the only one
to face this.

Maybe someone out there has a solution ...
Please let me know if you experienced the same problem, and know how to
resolve it ...

Thanks for your time

David

 <<dummy_orig.txt>> <<dummy_dl.txt>>

-------------------------------------------------------
Enterprise Linux Forum Conference & Expo, June 4-6, 2003, Santa Clara
The only event dedicated to issues related to Linux enterprise solutions
www.enterpriselinuxforum.com

Received on 2003-05-08