From ccd0f07c4167914640742fcec899a99153868e00 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 4 Oct 2000 13:08:17 +0000 Subject: [PATCH] -w supports size_header and size_request --- src/writeout.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/writeout.c b/src/writeout.c index 8a652ef6c..be48f84cc 100644 --- a/src/writeout.c +++ b/src/writeout.c @@ -59,6 +59,8 @@ typedef enum { VAR_SPEED_DOWNLOAD, VAR_SPEED_UPLOAD, VAR_HTTP_CODE, + VAR_HEADER_SIZE, + VAR_REQUEST_SIZE, VAR_EFFECTIVE_URL, VAR_NUM_OF_VARS /* must be the last */ } replaceid; @@ -76,6 +78,8 @@ static struct variable replacements[]={ {"time_namelookup", VAR_NAMELOOKUP_TIME}, {"time_connect", VAR_CONNECT_TIME}, {"time_pretransfer", VAR_PRETRANSFER_TIME}, + {"size_header", VAR_HEADER_SIZE}, + {"size_request", VAR_REQUEST_SIZE}, {"size_download", VAR_SIZE_DOWNLOAD}, {"size_upload", VAR_SIZE_UPLOAD}, {"speed_download", VAR_SPEED_DOWNLOAD}, @@ -120,6 +124,16 @@ void ourWriteOut(CURL *curl, char *writeinfo) curl_easy_getinfo(curl, CURLINFO_HTTP_CODE, &longinfo)) fprintf(stream, "%03d", longinfo); break; + case VAR_HEADER_SIZE: + if(CURLE_OK == + curl_easy_getinfo(curl, CURLINFO_HEADER_SIZE, &longinfo)) + fprintf(stream, "%d", longinfo); + break; + case VAR_REQUEST_SIZE: + if(CURLE_OK == + curl_easy_getinfo(curl, CURLINFO_REQUEST_SIZE, &longinfo)) + fprintf(stream, "%d", longinfo); + break; case VAR_TOTAL_TIME: if(CURLE_OK == curl_easy_getinfo(curl, CURLINFO_TOTAL_TIME, &doubleinfo))