Hello!

CURLOPT_WRITEFUNCTION(3) from curl-7.65.0 says:
| This callback function gets called by libcurl as soon as there is data
| received that needs to be saved. For most transfers, this callback
| gets called many times and each invoke delivers another chunk of data.
[…]
|
| The  callback  function  will  be  passed  as  much data as possible
| in all invokes, but you must not make any assumptions. It may be one
| byte, it may be thousands.
[…]

From these statements, it is not 100 % clear to me whether the function may be 
called with 0 bytes.

|
| This function may be called with zero bytes data if the transferred
| file is empty.

Ahh, good to know. But _still_, I am not sure whether the function may be 
called with 0 bytes _if the transferred file is *not* empty._


I would love to see an addition to the man page in exactly one of the following 
three forms:

1) This function will never be called with zero bytes if the transferred file 
is not empty.

2) This function may also be called with zero bytes if the transferred file is 
not empty.

3) Depending on the protocol [or something else], this function may or will 
never be called with zero bytes if the transferred file is not empty.

Maybe reword the text a bit. The sentence can be moved further up to appear 
in/after one of the other paragraphs I have cited.


I would have sent a patch, but I don’t know what the answer is.

Cheers
-- 
Nico

Nicolas Roeser
kiz – Information Systems Department, Ulm University
-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:   https://curl.haxx.se/mail/etiquette.html

Reply via email to