X-Git-Url: http://sjero.net/git/?p=wget;a=blobdiff_plain;f=src%2Fhttp.c;h=c82bbd2f39518fee4d6ae86a12aa119402e543b7;hp=00a35b324aae5ed9672d6a91c4e6bb6d42ecbaf6;hb=351e438e5109856d8e97af19583e655aa2f1bb4c;hpb=848d7537e17a6ca6b5e91b016e1490b1703b7331 diff --git a/src/http.c b/src/http.c index 00a35b32..c82bbd2f 100644 --- a/src/http.c +++ b/src/http.c @@ -1586,7 +1586,7 @@ read_response_body (struct http_stat *hs, int sock, FILE *fp, wgint contlen, /* Download the response body and write it to fp. If we are working on a WARC file, we simultaneously write the response body to warc_tmp. */ - hs->res = fd_read_body (sock, fp, contlen != -1 ? contlen : 0, + hs->res = fd_read_body (hs->local_file, sock, fp, contlen != -1 ? contlen : 0, hs->restval, &hs->rd_size, &hs->len, &hs->dltime, flags, warc_tmp); if (hs->res >= 0) @@ -2596,6 +2596,7 @@ read_header: tmp = parse_charset (tmp2); if (tmp) set_content_encoding (iri, tmp); + xfree_null(tmp); } } } @@ -2961,11 +2962,8 @@ read_header: fp = output_stream; /* Print fetch message, if opt.verbose. */ - if (opt.verbose) - { - logprintf (LOG_NOTQUIET, _("Saving to: %s\n"), + logprintf (LOG_VERBOSE, _("Saving to: %s\n"), HYPHENP (hs->local_file) ? quote ("STDOUT") : quote (hs->local_file)); - } err = read_response_body (hs, sock, fp, contlen, contrange,