aboutsummaryrefslogtreecommitdiff
path: root/docs/libcurl/opts/CURLINFO_CONTENT_LENGTH_UPLOAD.3
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2017-06-15 15:26:00 +0200
committerDaniel Stenberg <daniel@haxx.se>2017-06-19 09:27:42 +0200
commit3b80d3ca46b12e52342199f4a8452624bb6e33e2 (patch)
treeca9a3520a701148074c1061f65089e985144cbc6 /docs/libcurl/opts/CURLINFO_CONTENT_LENGTH_UPLOAD.3
parent6208547002b4d897c14364661ca4e2e5d0b80006 (diff)
getinfo: return sizes as curl_off_t
This change introduces new alternatives for the existing six curl_easy_getinfo() options that return sizes or speeds as doubles. The new versions are named like the old ones but with an appended '_T': CURLINFO_CONTENT_LENGTH_DOWNLOAD_T CURLINFO_CONTENT_LENGTH_UPLOAD_T CURLINFO_SIZE_DOWNLOAD_T CURLINFO_SIZE_UPLOAD_T CURLINFO_SPEED_DOWNLOAD_T CURLINFO_SPEED_UPLOAD_T Closes #1511
Diffstat (limited to 'docs/libcurl/opts/CURLINFO_CONTENT_LENGTH_UPLOAD.3')
-rw-r--r--docs/libcurl/opts/CURLINFO_CONTENT_LENGTH_UPLOAD.36
1 files changed, 5 insertions, 1 deletions
diff --git a/docs/libcurl/opts/CURLINFO_CONTENT_LENGTH_UPLOAD.3 b/docs/libcurl/opts/CURLINFO_CONTENT_LENGTH_UPLOAD.3
index 01eab2332..deaff925b 100644
--- a/docs/libcurl/opts/CURLINFO_CONTENT_LENGTH_UPLOAD.3
+++ b/docs/libcurl/opts/CURLINFO_CONTENT_LENGTH_UPLOAD.3
@@ -31,6 +31,9 @@ CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_CONTENT_LENGTH_UPLOAD,
.SH DESCRIPTION
Pass a pointer to a double to receive the specified size of the upload. Since
7.19.4, this returns -1 if the size isn't known.
+
+\fICURLINFO_CONTENT_LENGTH_UPLOAD_T(3)\fP is a newer replacement that returns a
+more sensible variable type.
.SH PROTOCOLS
All
.SH EXAMPLE
@@ -45,7 +48,7 @@ if(curl) {
if(!res) {
/* check the size */
double cl;
- res = curl_easy_getinfo(curl, CURLINFO_CONTENT_LENGTH_DOWNLOAD, &cl);
+ res = curl_easy_getinfo(curl, CURLINFO_CONTENT_LENGTH_UPLOAD, &cl);
if(!res) {
printf("Size: %.0f\\n", cl);
}
@@ -58,3 +61,4 @@ Added in 7.6.1
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
.SH "SEE ALSO"
.BR curl_easy_getinfo "(3), " curl_easy_setopt "(3), "
+.BR CURLINFO_CONTENT_LENGTH_DOWNLOAD_T "(3), "