aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2009-04-28 11:19:10 +0000
committerDaniel Stenberg <daniel@haxx.se>2009-04-28 11:19:10 +0000
commite01b7c1ede6f8b91f458259dbed96acce7bf3779 (patch)
tree5f9fd06a14d6ed451463c9e9d3efa36325abbeb3 /docs
parentdd8d472318d6346f98f366438c7a49f3b2d02503 (diff)
- Bug report #2709004 (http://curl.haxx.se/bug/view.cgi?id=2709004) by Tim
Chen pointed out how curl couldn't upload with resume when reading from a pipe. This ended up with the introduction of a new return code for the CURLOPT_SEEKFUNCTION callback that basically says that the seek failed but that libcurl may try to resolve the situation anyway. In our case this means libcurl will attempt to instead read that much data from the stream instead of seeking and that way curl can now upload with resume when data is read from a stream!
Diffstat (limited to 'docs')
-rw-r--r--docs/libcurl/curl_easy_setopt.37
1 files changed, 5 insertions, 2 deletions
diff --git a/docs/libcurl/curl_easy_setopt.3 b/docs/libcurl/curl_easy_setopt.3
index 0c93e7fa4..06e3a11b9 100644
--- a/docs/libcurl/curl_easy_setopt.3
+++ b/docs/libcurl/curl_easy_setopt.3
@@ -189,8 +189,11 @@ uploaded bytes with the normal read function/callback). It is also called to
rewind a stream when doing a HTTP PUT or POST with a multi-pass authentication
method. The function shall work like "fseek" or "lseek" and accepted SEEK_SET,
SEEK_CUR and SEEK_END as argument for origin, although (in 7.18.0) libcurl
-only passes SEEK_SET. The callback must return 0 on success as returning
-something else will cause the upload operation to fail.
+only passes SEEK_SET. The callback must return 0 (CURL_SEEKFUNC_OK) on
+success, 1 (CURL_SEEKFUNC_FAIL) to cause the upload operation to fail or 2
+(CURL_SEEKFUNC_CANTSEEK) to indicate that while the seek failed, libcurl is
+free to work around the problem if possible. The latter can sometimes be done
+by instead reading from the input or similar.
If you forward the input arguments directly to "fseek" or "lseek", note that
the data type for \fIoffset\fP is not the same as defined for curl_off_t on