On Wed, 15 Nov 2023, Jiří Hruška via curl-library wrote:

And it seems fine and intentional. Just slightly weird from the library user's perspective to get called again. Yet in line with how fread() would behave, and that's ultimately the API here, right?

I don't think this behavior was done on purpose and I think it would benefit users if we made it not do this. I think it should be sufficient for the callback to signal the end of the read *once*.

Writing up a test case to reproduce this scenario might take some creativity. Do you have any special setup that makes this happen more likely than others?

Fixing the code probably requires a better separation between end-of-input and end-of-upload than what that function does right now.

--

 / daniel.haxx.se
 | Commercial curl support up to 24x7 is available!
 | Private help, bug fixes, support, ports, new features
 | https://curl.se/support.html
-- 
Unsubscribe: https://lists.haxx.se/mailman/listinfo/curl-library
Etiquette:   https://curl.se/mail/etiquette.html

Reply via email to