cURL / Mailing Lists / curl-users / Single Mail


Can't seem to transfer binary type

From: Poulson, Shawn <>
Date: Mon, 17 Jun 2002 20:04:24 +0200

Hello all,

I'm using libcurl via Perl using the Curl::easy module on a Win32 platform.
I don't seem to have a problem downloading files, however they always come
down with the line endings translated from Unix to Dos type, regardless of
the file I select. The Verbose description shows "TYPE I", but the file
sizes are different and binary files are corrupt.

This happens regardless of the setting of CURLOPT_TRANSFERTEXT. Any ideas
what I can do?

Sample output:

Downloading 'ftp://root:xxx@csphl004/mbox'
* About to connect() to root:xxx_at_csphl004:21
* Connected to ( port 21
> USER root
> PASS xxx
* We have successfully logged in
* Entry path is '/root'
* About to connect() to root:xxx_at_csphl004:55351
* Connecting to ( port 55351
* Connected the data stream with PASV!
> SIZE mbox
> RETR mbox
* Getting file with size: 436497
* Connection #0 left intact
* Closing connection #0
Done. (449088 bytes)

Note "Getting file with size" versus "Done .. bytes" difference.

Shawn Poulson
SAP America
PSS Enterprise Systems Management
(610) 661-5011
Sponsored by:
ThinkGeek at
Received on 2002-06-17