+2001-11-24 Hrvoje Niksic <hniksic@arsdigita.com>
+
+ * progress.c (bar_update): Don't modify bp->total_length if it is
+ zero.
+
2001-11-24 Hrvoje Niksic <hniksic@arsdigita.com>
* retr.c (retrieve_url): When the redirection URL doesn't parse,
long dltime = wtimer_elapsed (bp->timer);
bp->count += howmuch;
- if (bp->count + bp->initial_length > bp->total_length)
+ if (bp->total_length > 0
+ && bp->count + bp->initial_length > bp->total_length)
/* We could be downloading more than total_length, e.g. when the
server sends an incorrect Content-Length header. In that case,
adjust bp->total_length to the new reality, so that the code in