cURL / Mailing Lists / curl-library / Single Mail

curl-library

Problems with CURLOPT_CRLF

From: Carlos Alloatti <calloatti_at_gmail.com>
Date: Sun, 5 Oct 2008 18:46:31 -0300

I have not been able to get CURLOPT_CRLF to work, I guess I must be
doing something wrong. The only code I have is a libcurl wrapper class
for Visual FoxPro, so I will describe what I am doing.

Purpose: download a text file from a server, convert LF to CRLF

CURLOPT_SSL_VERIFYHOST = 0
CURLOPT_SSL_VERIFYPEER = 0
CURLOPT_USE_SSL = CURLUSESSL_TRY
CURLOPT_VERBOSE = 1
CURLOPT_WRITEFUNCTION = writefunc
CURLOPT_WRITEDATA = filehandle

CURLOPT_CRLF = 1
CURLOPT_TRANSFERTEXT = 1
CURLOPT_URL = ftp://test:test@ftp.secureftp-test.com/hamlet.xml

the writefunc just saves the data using the Windows WriteFile Api function

Using libcurl libcurl/7.19.0 OpenSSL/0.9.8h zlib/1.2.3 from
http://www.gknw.net/mirror/curl/win32/curl-7.19.0-ssl-sspi-zlib-static-bin-w32.zip

It seems CURLOPT_CRLF has no effect, the downloaded file only has LFs, no CRLFs.

Any comments?

By the way, this is a libcurl wrapper class for Visual Foxpro 9,
http://www.ctl32.com.ar/libcurl.asp

If this is of any interest, maybe it could be added to the libcurl
bindings page.

-- 
Carlos Alloatti
Received on 2008-10-05