mirror of
https://github.com/curl/curl.git
synced 2026-08-25 00:53:32 +03:00
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
This commit is contained in:
parent
ebdb5f23cc
commit
7a90ddf88f
7 changed files with 128 additions and 104 deletions
|
|
@ -40,6 +40,7 @@
|
|||
|
||||
struct getout *new_getout(struct OperationConfig *config)
|
||||
{
|
||||
static int outnum = 0;
|
||||
struct getout *node = calloc(1, sizeof(struct getout));
|
||||
struct getout *last = config->url_last;
|
||||
if(node) {
|
||||
|
|
@ -53,6 +54,7 @@ struct getout *new_getout(struct OperationConfig *config)
|
|||
config->url_last = node;
|
||||
|
||||
node->flags = config->default_node_flags;
|
||||
node->num = outnum++;
|
||||
}
|
||||
return node;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue