aboutsummaryrefslogtreecommitdiff
path: root/src/writeout.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2000-10-04 13:08:17 +0000
committerDaniel Stenberg <daniel@haxx.se>2000-10-04 13:08:17 +0000
commitccd0f07c4167914640742fcec899a99153868e00 (patch)
tree6af31b10dd7215af8d7a944560724629d9367e2a /src/writeout.c
parent5865860ad6b9f02dba6ed389d554458930d47d07 (diff)
-w supports size_header and size_request
Diffstat (limited to 'src/writeout.c')
-rw-r--r--src/writeout.c14
1 files changed, 14 insertions, 0 deletions
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))