1
0
mirror of https://github.com/moparisthebest/wget synced 2024-07-03 16:38:41 -04:00

[svn] Don't modify bp->total_length if it equals zero.

This commit is contained in:
hniksic 2001-11-24 10:05:57 -08:00
parent 177b6ee8fd
commit b88223f99d
2 changed files with 7 additions and 1 deletions

View File

@ -1,3 +1,8 @@
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,

View File

@ -411,7 +411,8 @@ bar_update (void *progress, long howmuch)
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