cURL / Mailing Lists / curl-library / Single Mail

curl-library

Certain filetypes recieved with libcurl are corrupted

From: Aaron M <ajaymills_at_gmail.com>
Date: Fri, 4 Jul 2008 14:40:26 -0500

Hello! This seems like a very odd problem. All my code here is designed to
do (for the moment), is to be passed a single flag from the commandline
which dictates the name of the file to create. A fixed URL is accessed and
it's contents are saved to that file. What's strange here though, is that
specifically for doc files and pdf files, the resulting file is corrupt. It
isn't empty, and even retains some of the file properties as the original
(creator, keywords, etc), but for pdfs there is no text inside, and for
docs, MSWord can not even open it. Does anything seem wrong in my code? Has
anyone seen a simple example very similar, perhaps?

http://myweb.unomaha.edu/~amills/datasheetCL.cpp
Received on 2008-07-04