X-Git-Url: http://sjero.net/git/?a=blobdiff_plain;f=src%2Fhttp.c;h=4313176f33c7bdc457f2fed4453fde90e5e8b41d;hb=84396de6731454b46c70b1278a9270c24d6a6684;hp=a886f4883834d39e6533cc29d7a576173730a62e;hpb=024cb5ed3a0263775bc750b06bca74c91b389d2d;p=wget diff --git a/src/http.c b/src/http.c index a886f488..4313176f 100644 --- a/src/http.c +++ b/src/http.c @@ -546,7 +546,6 @@ gethttp (struct url *u, struct http_stat *hs, int *dt, struct url *proxy) static SSL_CTX *ssl_ctx = NULL; SSL *ssl = NULL; #endif /* HAVE_SSL */ - struct wget_timer *timer; char *cookies = NULL; /* Whether this connection will be kept alive after the HTTP request @@ -1344,13 +1343,12 @@ Refusing to truncate existing file `%s'.\n\n"), *hs->local_file); should be some overhead information. */ if (opt.save_headers) fwrite (all_headers, 1, all_length, fp); - timer = wtimer_new (); + /* Get the contents of the document. */ hs->res = get_contents (sock, fp, &hs->len, hs->restval, (contlen != -1 ? contlen : 0), - &rbuf, keep_alive); - hs->dltime = wtimer_elapsed (timer); - wtimer_delete (timer); + &rbuf, keep_alive, &hs->dltime); + { /* Close or flush the file. We have to be careful to check for error here. Checking the result of fwrite() is not enough --