summaryrefslogtreecommitdiff
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-15 15:26:00 +0200
commita2565d0aa7905f893485891820fa18c115a6b70d (patch)
tree29dd83481515aca619b8d4b773f10de24e3e049b /docs/libcurl/opts/CURLINFO_CONTENT_LENGTH_UPLOAD.3
parentefc83d6d541ab62c7beb1ddca09f6c1986fbeac7 (diff)
downloadcurl-a2565d0aa7905f893485891820fa18c115a6b70d.tar.gz
getinfo: return sizes as curl_off_tbagder/getinfo-return-sizes-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
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), "