| |
|
|
|
cURL Mailing List Monthly Index Single Mail
curl-library Mailing List Archives
Losing a byte with 7.10.5
From: Ben <nascarben_at_excite.com>
Date: Tue, 5 Aug 2003 11:48:07 -0400 (EDT)
Hello,I am using libcurl 7.10.5 with the easy interface in VC6. I am trying to download a binary file from one of our servers. I have checked to make sure that everything starts properly, but for some reason I'm losing one byte, which is corrupting the binary. Below is what I have for my write function and the curlopt calls i'm using.int my_fwrite(void *buffer, size_t size, size_t nmemb, void *stream) { struct FtpFile *out=(struct FtpFile *)stream; if(out && !out->stream) { /* open file for writing */ out->stream=fopen(out->filename, "wb"); if(!out->stream) return -1; /* failure, can't open file to write */ } return fwrite(buffer, size, nmemb, out->stream); } curlopt calls curl_easy_setopt(curl, CURLOPT_CONNECTTIMEOUT, connecttimeout); curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, location); curl_easy_setopt(curl, CURLOPT_BUFFERSIZE, nobuf
_______________________________________________
-------------------------------------------------------
These mail archives are generated by hypermail. |
Page updated November 12, 2010.
web site info