summaryrefslogtreecommitdiff
path: root/src/curl
diff options
context:
space:
mode:
Diffstat (limited to 'src/curl')
-rw-r--r--src/curl/curl.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/curl/curl.c b/src/curl/curl.c
index 4bd2a55d0..1c352f195 100644
--- a/src/curl/curl.c
+++ b/src/curl/curl.c
@@ -526,11 +526,20 @@ GNUNET_CURL_perform2 (struct GNUNET_CURL_Context *ctx,
526 &size_long)); 526 &size_long));
527 bytes_sent += size_long; 527 bytes_sent += size_long;
528 528
529 /* We obtain this value to check an invariant, but never use it otherwise. */
529 GNUNET_break (CURLE_OK == 530 GNUNET_break (CURLE_OK ==
530 curl_easy_getinfo (cmsg->easy_handle, 531 curl_easy_getinfo (cmsg->easy_handle,
531 CURLINFO_SIZE_UPLOAD_T, 532 CURLINFO_SIZE_UPLOAD_T,
532 &size_curl)); 533 &size_curl));
533 bytes_sent += size_curl; 534
535 /* CURLINFO_SIZE_UPLOAD_T <= CURLINFO_REQUEST_SIZE should
536 be an invariant.
537 As verified with
538 curl -w "foo%{size_request} -XPOST --data "ABC" $URL
539 the CURLINFO_REQUEST_SIZE should be the whole size of the request
540 including headers and body.
541 */
542 GNUNET_break (size_curl <= size_long);
534 543
535 urd = get_url_benchmark_data (url, (unsigned int) response_code); 544 urd = get_url_benchmark_data (url, (unsigned int) response_code);
536 urd->count++; 545 urd->count++;