X-Git-Url: http://sjero.net/git/?p=wget;a=blobdiff_plain;f=src%2Fhttp.c;h=33b9a53c46af12ea1f49b9aa21c8edc38957660f;hp=9e5074a1197ae3b33b31b6f766285fbef5fec52e;hb=d8c11a82ca9e8fab6689b53dc12199da4cc6058d;hpb=b132127412def9e5094f70bed5792618a91b1b5d diff --git a/src/http.c b/src/http.c index 9e5074a1..33b9a53c 100644 --- a/src/http.c +++ b/src/http.c @@ -2150,11 +2150,15 @@ File %s already there; not retrieving.\n\n"), quote (hs->local_file)); } } - if (statcode == HTTP_STATUS_RANGE_NOT_SATISFIABLE) + if (statcode == HTTP_STATUS_RANGE_NOT_SATISFIABLE + || (hs->restval > 0 && statcode == HTTP_STATUS_OK + && contrange == 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 - after the end of file and the server response with 416. */ + after the end of file and the server response with 416 + (or 200 with a <= Content-Length. */ logputs (LOG_VERBOSE, _("\ \n The file is already fully retrieved; nothing to do.\n\n")); /* In case the caller inspects. */