diff --git a/src/ChangeLog b/src/ChangeLog index 30b6c9cc..5c8dea7a 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2010-07-20 Alan Jenkins (tiny change) + + * http.c (gethttp): Check content-length was set before trying to + compare it with the already downloded filesize. + 2010-07-20 Leonid Petrov * ftp.c (getftp): Don't attempt to retrieve the file if it is already diff --git a/src/http.c b/src/http.c index 28fd24f9..1c1e165c 100644 --- a/src/http.c +++ b/src/http.c @@ -2377,7 +2377,7 @@ File %s already there; not retrieving.\n\n"), quote (hs->local_file)); if (statcode == HTTP_STATUS_RANGE_NOT_SATISFIABLE || (!opt.timestamping && hs->restval > 0 && statcode == HTTP_STATUS_OK - && contrange == 0 && hs->restval >= contlen)) + && contrange == 0 && contlen >= 0 && hs->restval >= contlen)) { /* If `-c' is in use and the file has been fully downloaded (or the remote file has shrunk), Wget effectively requests bytes