aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2009-10-31 18:51:50 +0000
committerDaniel Stenberg <daniel@haxx.se>2009-10-31 18:51:50 +0000
commit223d84810435d1fa3937e46488f6a4763de06972 (patch)
tree61e4fb95724c1eae894426e669faf284b2846e28 /tests
parentd8884168e3b094b47d70c49f902a6ef669f6c31c (diff)
- 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.
Diffstat (limited to 'tests')
-rw-r--r--tests/libtest/lib566.c4
1 files changed, 2 insertions, 2 deletions
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);
}
}