diff options
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main.c b/src/main.c index 3e1918be1..2545cd058 100644 --- a/src/main.c +++ b/src/main.c @@ -1153,7 +1153,7 @@ int main(int argc, char *argv[]) URGTAG_CRLF, config.crlf, URGTAG_QUOTE, config.quote, URGTAG_POSTQUOTE, config.postquote, - URGTAG_WRITEHEADER, &heads, + URGTAG_WRITEHEADER, config.headerfile?&heads:NULL, URGTAG_COOKIEFILE, config.cookiefile, URGTAG_SSLVERSION, config.ssl_version, URGTAG_TIMECONDITION, config.timecond, @@ -1171,7 +1171,7 @@ int main(int argc, char *argv[]) /* it wasn't directed to stdout or stderr so close the file! */ fclose(config.errors); - if(!headerfilep && heads.stream) + if(config.headerfile && !headerfilep && heads.stream) fclose(heads.stream); if(urlbuffer) |