]> 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)
1  2 
src/ChangeLog
src/http.c

diff --combined src/ChangeLog
index 688b95957a4f1d309cf8f63696b552bcc20edd2f,99cd940cd518cd927d1c91a2588c098c48cbf8dc..193bcd75ca2fe5c9955463c0c29e9ffce6f19bfe
@@@ -1,20 -1,8 +1,25 @@@
+ 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.
 +
 +      * ftp.c, http.c: Make the counter visible here and use it.
 +      
 +      * options.h: Remove old declaration from options struct.
 +
 +2008-11-15  Steven Schubiger  <stsc@members.fsf.org>
 +
 +      * init.c (defaults): Set default waitretry value.
 +
 +2008-11-14  Steven Schubiger  <stsc@members.fsf.org>
 +
 +      * main.c (format_and_print_line): Use a custom format 
 +      string for printing leading spaces.
 +
  2008-11-12  Micah Cowan  <micah@cowan.name>
  
        * ftp-ls.c (ftp_index): HTML-escape dir name in title, h1, a:href.
diff --combined src/http.c
index 9e5074a1197ae3b33b31b6f766285fbef5fec52e,cd0dba85ea73be5cc8cf230606e1cf485647b3a5..33b9a53c46af12ea1f49b9aa21c8edc38957660f
@@@ -142,8 -142,6 +142,8 @@@ struct request 
    int hcount, hcapacity;
  };
  
 +extern int numurls;
 +
  /* Create a new, empty request.  At least request_set_method must be
     called before the request can be used.  */
  
@@@ -2150,11 -2148,15 +2150,15 @@@ File %s already there; not retrieving.\
          }
      }
  
-   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. */
@@@ -2762,7 -2764,7 +2766,7 @@@ Remote file exists.\n\n"))
                           number_to_static_string (hstat.contlen),
                           hstat.local_file, count);
              }
 -          ++opt.numurls;
 +          ++numurls;
            total_downloaded_bytes += hstat.len;
  
            /* Remember that we downloaded the file for later ".orig" code. */
                               tms, u->url, number_to_static_string (hstat.len),
                               hstat.local_file, count);
                  }
 -              ++opt.numurls;
 +              ++numurls;
                total_downloaded_bytes += hstat.len;
  
                /* Remember that we downloaded the file for later ".orig" code. */