1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-22 08:08:50 -05:00

curl_easy_setopt.3: mention TFTP read callback flaw

The read callback must return the exact requested amount of data when it
is used for doing TFTP uploads. This is due to how it deals with data
internally. This could/should be fixed but for now we document the
existing behavior.

Reported by: Colin Blair
Bug: http://curl.haxx.se/mail/lib-2011-03/0319.html
This commit is contained in:
Daniel Stenberg 2011-03-29 11:19:49 +02:00
parent 4913a08cb6
commit 2a0c7ea4cc

View File

@ -208,6 +208,10 @@ From 7.18.0, the function can return CURL_READFUNC_PAUSE which then will cause
reading from this connection to become paused. See \fIcurl_easy_pause(3)\fP
for further details.
\fBBugs\fP: when doing TFTP uploads, you must return the exact amount of data
that the callback wants, or it will be considered the final packet by the
server end and the transfer will end there.
If you set this callback pointer to NULL, or don't set it at all, the default
internal read function will be used. It is doing an fread() on the FILE *
userdata set with \fICURLOPT_READDATA\fP.