diff options
author | Emil Engler <me@emilengler.com> | 2020-01-21 09:23:21 +0100 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2020-01-21 09:23:30 +0100 |
commit | 1774dbd74c77cd6c728588c8a717903dd16003f3 (patch) | |
tree | eebea755644be34033f1e6cc5ae2c650ad6bfa0e /src | |
parent | 81e1b1ec2301327189c80645d87fd871eeb37a91 (diff) |
curl: Let -D merge headers in one file again
Closes #4762
Fixes #4753
Diffstat (limited to 'src')
-rw-r--r-- | src/tool_operate.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/tool_operate.c b/src/tool_operate.c index 66f2139c8..2e6563a20 100644 --- a/src/tool_operate.c +++ b/src/tool_operate.c @@ -871,7 +871,8 @@ static CURLcode single_transfer(struct GlobalConfig *global, if(config->headerfile) { /* open file for output: */ if(strcmp(config->headerfile, "-")) { - FILE *newfile = fopen(config->headerfile, "wb"); + FILE *newfile; + newfile = fopen(config->headerfile, per->prev == NULL?"wb":"ab"); if(!newfile) { warnf(config->global, "Failed to open %s\n", config->headerfile); result = CURLE_WRITE_ERROR; |