+2010-07-20 Alan Jenkins <alan-jenkins@tuffmail.co.uk> (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 <nouser@lpetrov.net>
* ftp.c (getftp): Don't attempt to retrieve the file if it is already
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