]> git.ipfire.org Git - thirdparty/curl.git/commit
curl: add variables to --write-out
authorDaniel Stenberg <daniel@haxx.se>
Mon, 14 Dec 2020 09:09:51 +0000 (10:09 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 21 Dec 2020 15:38:48 +0000 (16:38 +0100)
commit7a90ddf88f5a1b313ecd28e1ec064d8351b0ddf2
tree0b0b2a7df6ae8039b6eb61ca75d9f7eb2eaea76f
parentebdb5f23ccb0b658263f212ecbb52b10a03187dd
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
docs/cmdline-opts/write-out.d
src/tool_operate.c
src/tool_operate.h
src/tool_paramhlp.c
src/tool_sdecls.h
src/tool_writeout.c
src/tool_writeout.h