cURL / Mailing Lists / curl-library / Single Mail

curl-library

Réf. : Download windows/linux problem

From: Philippe HAMEAU <philippe.hameau_at_sagem.com>
Date: Fri, 29 Sep 2006 15:57:46 +0200

How about using
 file = fopen("myFile.exe","wb");
?

Phil

"Thiago Ribeiro" <thiagoribeiro_at_gmail.com>

Envoyé par : curl-library-bounces_at_cool.haxx.se
29/09/2006 15:13
Veuillez répondre à libcurl development
Remis le : 29/09/2006 15:25

 
        Pour : curl-library_at_cool.haxx.se
        cc : (ccc : Philippe HAMEAU/DRD/SAGEM)
        Objet : Download windows/linux problem

I'm trying to create a download client on windows using a linux web server
with the file but i'm having problems with the file format (CR / LF). The
libCURL adds end line characteres.

int main(int argc, char *argv[])
{
    CURL *curl;
    CURLcode res;

    curl = curl_easy_init();
    if(curl) {
     file = fopen("myFile.exe","w");
      curl_easy_setopt(curl, CURLOPT_WRITEDATA, file);

      curl_easy_setopt(curl, CURLOPT_URL, "http://www.mySite.com/myFile.exe");

      res = curl_easy_perform(curl);
      fclose(arq);
      curl_easy_cleanup(curl);
    }
    system("PAUSE");
    return EXIT_SUCCESS;
}

Can someone help me?

" Ce courriel et les documents qui y sont attaches peuvent contenir des informations confidentielles. Si vous n'etes pas le destinataire escompte, merci d'en informer l'expediteur immédiatement et de detruire ce courriel ainsi que tous les documents attaches de votre systeme informatique. Toute divulgation, distribution ou copie du présent courriel et des documents attaches sans autorisation prealable de son emetteur est interdite."

" This e-mail and any attached documents may contain confidential or proprietary information. If you are not the intended recipient, please advise the sender immediately and delete this e-mail and all attached documents from your computer system. Any unauthorised disclosure, distribution or copying hereof is prohibited."
Received on 2006-09-29