]> sjero.net Git - wget/blobdiff - src/http.c
[svn] Before concluding that the file is already fully retrieved, make sure
[wget] / src / http.c
index bf6a57ea9848301cf9592d5b9562f964d08aec30..23ed7ddc708580eec36cec3ed5fde5f404b3eb08 100644 (file)
@@ -1190,7 +1190,11 @@ Accept: %s\r\n\
       if (opt.always_rest)
        {
          /* Check for condition #2. */
-         if (hs->restval >= contlen)
+         if (hs->restval > 0               /* restart was requested. */
+             && contlen != -1              /* we got content-length. */
+             && hs->restval >= contlen     /* file fully downloaded
+                                              or has shrunk.  */
+             )
            {
              logputs (LOG_VERBOSE, _("\
 \n    The file is already fully retrieved; nothing to do.\n\n"));