]> sjero.net Git - wget/commitdiff
Automated merge.
authorMicah Cowan <micah@cowan.name>
Thu, 27 Nov 2008 05:53:40 +0000 (21:53 -0800)
committerMicah Cowan <micah@cowan.name>
Thu, 27 Nov 2008 05:53:40 +0000 (21:53 -0800)
src/ChangeLog
src/http.c

index 688b95957a4f1d309cf8f63696b552bcc20edd2f..193bcd75ca2fe5c9955463c0c29e9ffce6f19bfe 100644 (file)
@@ -1,3 +1,8 @@
+2008-11-13  Micah Cowan  <micah@cowan.name>
+
+       * http.c (gethttp): Don't do anything when content-length >= our
+       requested range.
+
 2008-11-16  Steven Schubiger  <stsc@members.fsf.org>
 
        * main.c: Declare and initialize the numurls counter.
index 9e5074a1197ae3b33b31b6f766285fbef5fec52e..33b9a53c46af12ea1f49b9aa21c8edc38957660f 100644 (file)
@@ -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. */