cURL / Mailing Lists / curl-library / Single Mail

curl-library

size_t write_function(...) not catching all data?

From: Leigh Morresi <lam_at_d2p.com.au>
Date: Tue, 21 Jun 2005 10:45:19 +1000

hi there

 Im doing a HTTP POST (upload) in curlPP with the following setup, however
 write_function is only receiving about the first 50 bytes of data.
 Also i noticed "size_t size" is always 1, even tho bufptr may contain around 50
 bytes of data?

 What should write_function return?

 size_t write_function(char *bufptr, size_t size, size_t nitems, void *userp) {
 }

 ( ... formpost setup earlier.. )

 curl_easy_setopt(curl, CURLOPT_HTTPPOST, formpost);
 curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_function);
 res = curl_easy_perform(curl);

 Any ideas on where to check? essentially this app is doing a http upload then
 writing the response to disk and opening the default browser to that response
 information

 thanks

 leigh

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.

Received on 2005-06-21