+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"
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;
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);
}