From 6c9f37d263593bd72759cc2c0d275a3a9cd47b19 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 23 Feb 2009 18:45:00 +0000 Subject: - After a bug reported by James Cheng I've made curl_easy_getinfo() for CURLINFO_CONTENT_LENGTH_DOWNLOAD and CURLINFO_CONTENT_LENGTH_UPLOAD return -1 if the sizes aren't know. Previously these returned 0, make it impossible to detect the difference between actually zero and unknown. --- docs/libcurl/curl_easy_getinfo.3 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'docs/libcurl/curl_easy_getinfo.3') diff --git a/docs/libcurl/curl_easy_getinfo.3 b/docs/libcurl/curl_easy_getinfo.3 index 6c999cb7d..63aea1b84 100644 --- a/docs/libcurl/curl_easy_getinfo.3 +++ b/docs/libcurl/curl_easy_getinfo.3 @@ -134,9 +134,11 @@ on the list pointer once you're done with it, as libcurl will not free the data for you. (Added in 7.12.3) .IP CURLINFO_CONTENT_LENGTH_DOWNLOAD Pass a pointer to a double to receive the content-length of the download. This -is the value read from the Content-Length: field. +is the value read from the Content-Length: field. Since 7.19.4, this returns -1 +if the size isn't known. .IP CURLINFO_CONTENT_LENGTH_UPLOAD -Pass a pointer to a double to receive the specified size of the upload. +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. .IP CURLINFO_CONTENT_TYPE Pass a pointer to a 'char *' to receive the content-type of the downloaded object. This is the value read from the Content-Type: field. If you get NULL, -- cgit v1.2.3