]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
curl_easy_setopt.3: mention TFTP read callback flaw
authorDaniel Stenberg <daniel@haxx.se>
Tue, 29 Mar 2011 09:19:49 +0000 (11:19 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Tue, 29 Mar 2011 09:19:49 +0000 (11:19 +0200)
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

docs/libcurl/curl_easy_setopt.3

index 6166d5fd50f549d4c2674400ba88324300f1f102..16f4b5842d65c61d3599a7dd40a874aa8e3145cc 100644 (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.