On Fri, 25 Sep 2009, Gross, Tim (Utility Computing Architect) wrote:

        http://curl.haxx.se/libcurl/c/post-callback.html

Thanks for the pointer to this sample program. I have one question about setting the CURLOPT_POSTFIELDSIZE_LARGE option, which I think is preferable if I am posting the contents of a large file.

Either that, or set the chunked encoding header.

Should the parameter curl_easy_setopt() be the size of the data transferred with each call to the read_callback function, or the total size?

The total.

If I am reading in the content from a file, maybe this should be the size of the file.

It should be the total size you're going to POST.

I am not sure what effect setting the CURLOPT_POSTFIELDSIZE_LARGE really has. I have read the documentation, but it is not clear. Does this set the maximum number of bytes to transfer.

It tells the server (and libcurl) how many bytes you're about to transfer.

--

 / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html

Reply via email to