diff options
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; |