diff options
author | Daniel Stenberg <daniel@haxx.se> | 2020-12-14 10:09:51 +0100 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2020-12-21 16:38:48 +0100 |
commit | 7a90ddf88f5a1b313ecd28e1ec064d8351b0ddf2 (patch) | |
tree | 0b0b2a7df6ae8039b6eb61ca75d9f7eb2eaea76f /src/tool_operate.h | |
parent | ebdb5f23ccb0b658263f212ecbb52b10a03187dd (diff) | |
download | curl-7a90ddf88f5a1b313ecd28e1ec064d8351b0ddf2.tar.gz |
curl: add variables to --write-out
In particular, these ones can help a user to create its own error
message when one or transfers fail.
writeout: add 'onerror', 'url', 'urlnum', 'exitcode', 'errormsg'
onerror - lets a user only show the rest on non-zero exit codes
url - the input URL used for this transfer
urlnum - the numerical URL counter (0 indexed) for this transfer
exitcode - the numerical exit code for the transfer
errormsg - obvious
Reported-by: Earnestly on github
Fixes #6199
Closes #6207
Diffstat (limited to 'src/tool_operate.h')
-rw-r--r-- | src/tool_operate.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/tool_operate.h b/src/tool_operate.h index fae978dff..2739301ce 100644 --- a/src/tool_operate.h +++ b/src/tool_operate.h @@ -41,6 +41,7 @@ struct per_transfer { struct metalinkfile *mlfile; struct metalink_resource *mlres; char *this_url; + unsigned int urlnum; /* the index of the given URL */ char *outfile; bool infdopen; /* TRUE if infd needs closing */ int infd; |