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

Fix a failure if the server doesn't specify a content-length and -c is used.

This commit is contained in:
Alan Jenkins 2010-07-20 19:42:13 +02:00 committed by Giuseppe Scrivano
parent 7171d76960
commit 954fead685
2 changed files with 6 additions and 1 deletions

View File

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

View File

@ -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