]> granicus.if.org Git - curl/commitdiff
CURLINFO_CONTENT_LENGTH_DOWNLOAD and CURLINFO_CONTENT_LENGTH_UPLOAD were
authorDaniel Stenberg <daniel@haxx.se>
Sun, 4 Feb 2001 20:03:30 +0000 (20:03 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Sun, 4 Feb 2001 20:03:30 +0000 (20:03 +0000)
added as suggested by Bob Schader

include/curl/curl.h
lib/getinfo.c

index b038834da3f157501243919203961d6b0037f618..4e90bfe2c37be1371a98e8f31397236174808fae 100644 (file)
@@ -676,7 +676,10 @@ typedef enum {
   CURLINFO_SSL_VERIFYRESULT = CURLINFO_LONG   + 13,
   CURLINFO_FILETIME         = CURLINFO_LONG   + 14,
 
-  CURLINFO_LASTONE          = 15
+  CURLINFO_CONTENT_LENGTH_DOWNLOAD   = CURLINFO_DOUBLE + 15,
+  CURLINFO_CONTENT_LENGTH_UPLOAD     = CURLINFO_DOUBLE + 16,
+
+  CURLINFO_LASTONE          = 17
 } CURLINFO;
 
 /*
index 140736294f907a0b18985aee603b3aa87c4e2ab3..400087183db912d146e4ec02c31b605a599b2b98 100644 (file)
@@ -103,6 +103,12 @@ CURLcode curl_getinfo(CURL *curl, CURLINFO info, ...)
   case CURLINFO_SSL_VERIFYRESULT:
     *param_longp = data->ssl.certverifyresult;
     break;
+  case CURLINFO_CONTENT_LENGTH_DOWNLOAD:
+    *param_doublep = data->progress.size_dl;
+    break;
+  case CURLINFO_CONTENT_LENGTH_UPLOAD:
+    *param_doublep = data->progress.size_ul;
+    break;
   default:
     return CURLE_BAD_FUNCTION_ARGUMENT;
   }