Buy commercial curl support from WolfSSL. We help you work
out your issues, debug your libcurl applications, use the API, port to new
platforms, add new features and more. With a team lead by the curl founder
himself.
Re: Should CURLOPT_READFUNCTION need EOF twice?
- Contemporary messages sorted: [ by date ] [ by thread ] [ by subject ] [ by author ] [ by messages with attachments ]
From: Daniel Stenberg via curl-library <curl-library_at_lists.haxx.se>
Date: Wed, 15 Nov 2023 08:10:40 +0100 (CET)
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.
Date: Wed, 15 Nov 2023 08:10:40 +0100 (CET)
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.htmlReceived on 2023-11-15