From: Micah Cowan Date: Tue, 2 Dec 2008 06:59:03 +0000 (-0800) Subject: Not-so-automated merge. X-Git-Tag: v1.13~372 X-Git-Url: http://sjero.net/git/?p=wget;a=commitdiff_plain;h=58de6f00335b5be480469503560dc424ea91e1cf;hp=51f8e656335f0322feeb9a6d2cb5eaeaa258ec4e Not-so-automated merge. --- diff --git a/src/ChangeLog b/src/ChangeLog index 744ff2d2..5e7fc16d 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2008-11-13 Micah Cowan + + * http.c (gethttp): Don't do anything when content-length >= our + requested range. + 2008-11-27 Saint Xavier * http.c (gethttp): Move authentication code before filename diff --git a/src/http.c b/src/http.c index a52df265..090950d2 100644 --- a/src/http.c +++ b/src/http.c @@ -2152,11 +2152,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. */