cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Problem with CURLOPT_WRITEDATA getting Binary data

From: Kamil Dudka <kdudka_at_redhat.com>
Date: Sun, 30 May 2010 16:56:23 +0200

On Sunday 30 of May 2010 15:36:37 Kalidoss Sivasamy wrote:
> Yes, I took it from the examples and it works for fetching web pages.
>
> Here I am trying to get a pdf test file but it prints only the first
> few bytes for some reason. You should be able to compile and run it to
> see what I am referring to.

So the problem is probably in the printing, not in getting the content,
as Tor already suggested. You want to use fwrite(), instead of printf(),
to stream out the binary data.

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