X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=tests%2Flibtest%2Flib599.c;h=08c536c7215bed186e491498fba374ede3722759;hb=df4392d06fac8fead7a2cbde19684f54c580af68;hp=6b092677a0f03814fba8966ec8a118760722a2cf;hpb=867eb33477c07331e7b58302119308d02a02ee01;p=platform%2Fupstream%2Fcurl.git diff --git a/tests/libtest/lib599.c b/tests/libtest/lib599.c index 6b09267..08c536c 100644 --- a/tests/libtest/lib599.c +++ b/tests/libtest/lib599.c @@ -43,6 +43,7 @@ int test(char *URL) { CURL *curl; CURLcode res=CURLE_OK; + double content_length = 0.0; if (curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) { fprintf(stderr, "curl_global_init() failed\n"); @@ -74,6 +75,17 @@ int test(char *URL) /* Perform the request, res will get the return code */ res = curl_easy_perform(curl); + if (!res) { + FILE *moo; + res = curl_easy_getinfo(curl, CURLINFO_CONTENT_LENGTH_DOWNLOAD, + &content_length); + moo = fopen(libtest_arg2, "wb"); + if (moo) { + fprintf(moo, "CL: %.0f\n", content_length); + fclose(moo); + } + } + test_cleanup: /* always cleanup */