cURL / Mailing Lists / curl-library / Single Mail

curl-library

RE: Problem with binary data

From: Sharma, Amit <as230007_at_exchange.Canada.NCR.com>
Date: Fri, 31 Oct 2003 10:23:04 -0500

Thanx for the insight. However, I am using Unix(solaris) and not windows and
as such I do not have to worry about opening the file in binary mode.
It is sad that the server is responding the binary data without actually
encoding it. Can't do much about that. Am wondering if the HTTP protocol
handles binary data without actually trying to modifying it. Any Ideas??

Gracias,
Amit

-----Original Message-----
From: Linus Nielsen Feltzing [mailto:linus_at_haxx.se]
Sent: Friday, October 31, 2003 3:19 AM
To: curl-library_at_lists.sourceforge.net
Subject: Re: Problem with binary data

Sharma, Amit wrote:
> am wondering if libcurl is doing modifications with the binary data
> received or I need to have some special mechanism in my callback to
> handle the binary data.

I'm sure that libcurl doesn't do anything with the data. However, if you
are using WIN32, make sure that you open the file in binary mode, i.e
fopen("name", "wb"), otherwise, it will insert extra CR characters into
the file.

Linus

-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program. Does
SourceForge.net help you be more productive? Does it
help you create better code? SHARE THE LOVE, and help us help
YOU! Click Here: http://sourceforge.net/donate/

-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive? Does it
help you create better code? SHARE THE LOVE, and help us help
YOU! Click Here: http://sourceforge.net/donate/
Received on 2003-10-31