cURL Mailing List Monthly Index Single Mail
curl-library Mailing List Archives
some observation with read callback
when I played with the ftpupload example, and added the read callback function,
I saw that the callback gets always called one time more as needed.
F.e. I had a text file with 26 bytes which I would assume that it fits into the buffer;
but anyhow I get _two_ calls to the callback: the first reads 26 bytes, and the second 0.
I'm asking me if that could be related to the NetWare bug I saw with 7.16.5 and later
which the Novell developer identified as a call with zero bytes to the socket function?
I would expect that at the place the where callback is called there would be a compare
if the returned bytes count is less than the passed-in buffer size, and if so this should
indicate that the file is already completely read; currently it seems that there's only
a check if the callback returns 0...
Anyone has a pointer where the callback is called and this check happens?
couldnt find it within few minutes (or overlooked?), and no time to dig through more code...
Received on 2008-02-21
These mail archives are generated by hypermail.
Page updated November 12, 2010.
File upload with ASP.NET
web site info