From 223d84810435d1fa3937e46488f6a4763de06972 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Sat, 31 Oct 2009 18:51:50 +0000 Subject: - Gabriel Kuri reported a problem with CURLINFO_CONTENT_LENGTH_DOWNLOAD if the download was 0 bytes, as libcurl would then return the size as unknown (-1) and not 0. I wrote a fix and test case 566 to verify it. --- tests/libtest/lib566.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/libtest/lib566.c') diff --git a/tests/libtest/lib566.c b/tests/libtest/lib566.c index 143a67b71..e2cbe7769 100644 --- a/tests/libtest/lib566.c +++ b/tests/libtest/lib566.c @@ -17,7 +17,7 @@ int test(char *URL) CURLcode res; CURL *curl; - long content_length; + double content_length = 3; if (curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) { fprintf(stderr, "curl_global_init() failed\n"); @@ -41,7 +41,7 @@ int test(char *URL) &content_length); moo = fopen(libtest_arg2, "wb"); if(moo) { - fprintf(moo, "CL: %ld\n", content_length); + fprintf(moo, "CL: %.0f\n", content_length); fclose(moo); } } -- cgit v1.2.3