mirror of
https://github.com/moparisthebest/wget
synced 2024-07-03 16:38:41 -04:00
[svn] retr.c (fd_read_body): Pass total size to progress_create, not
the remaining amount.
This commit is contained in:
parent
9179f2e699
commit
261183c609
@ -1,3 +1,8 @@
|
||||
2003-12-12 Hrvoje Niksic <hniksic@xemacs.org>
|
||||
|
||||
* retr.c (fd_read_body): Pass total size to progress_create, not
|
||||
the remaining amount.
|
||||
|
||||
2003-12-12 Hrvoje Niksic <hniksic@xemacs.org>
|
||||
|
||||
* retr.c (fd_read_body): Don't fiddle with "interactive timeout"
|
||||
|
@ -1718,6 +1718,8 @@ gethttp (struct url *u, struct http_stat *hs, int *dt, struct url *proxy)
|
||||
if (keep_alive)
|
||||
flags |= rb_read_exactly;
|
||||
if (hs->restval > 0 && contrange == 0)
|
||||
/* If the server ignored our range request, instruct fd_read_body
|
||||
to skip the first RESTVAL bytes of body. */
|
||||
flags |= rb_skip_startpos;
|
||||
hs->len = hs->restval;
|
||||
hs->rd_size = 0;
|
||||
|
@ -224,9 +224,10 @@ fd_read_body (int fd, FILE *out, long toread, long startpos,
|
||||
|
||||
if (opt.verbose)
|
||||
{
|
||||
/* If we're skipping STARTPOS bytes, hide it from
|
||||
progress_create because the indicator can't deal with it. */
|
||||
progress = progress_create (skip ? 0 : startpos, toread);
|
||||
/* If we're skipping STARTPOS bytes, pass 0 as the INITIAL
|
||||
argument to progress_create because the indicator doesn't
|
||||
(yet) know about "skipping" data. */
|
||||
progress = progress_create (skip ? 0 : startpos, startpos + toread);
|
||||
progress_interactive = progress_interactive_p (progress);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user