tool_writeout: add new writeout variable, %{num_headers}

This variable gives the number of headers.

Closes #5947
This commit is contained in:
anio 2020-09-09 15:05:49 +00:00 committed by Daniel Stenberg
parent 4e66207c58
commit 0c1e767e83
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
14 changed files with 191 additions and 23 deletions

View file

@ -22,6 +22,7 @@
*
***************************************************************************/
#include "tool_setup.h"
#include "tool_operate.h"
typedef enum {
VAR_NONE, /* must be the first */
@ -38,6 +39,7 @@ typedef enum {
VAR_HTTP_CODE,
VAR_HTTP_CODE_PROXY,
VAR_HEADER_SIZE,
VAR_NUM_HEADERS,
VAR_REQUEST_SIZE,
VAR_EFFECTIVE_METHOD,
VAR_EFFECTIVE_URL,
@ -80,6 +82,6 @@ struct writeoutvar {
jsontype jsontype;
};
void ourWriteOut(CURL *curl, struct OutStruct *outs, const char *writeinfo);
void ourWriteOut(CURL *curl, struct per_transfer *per, const char *writeinfo);
#endif /* HEADER_CURL_TOOL_WRITEOUT_H */