]> sjero.net Git - wget/blobdiff - src/http.c
On a network error, attempt to resume the download, not restart it.
[wget] / src / http.c
index b34e57d0aa6cb0a2ba96df1db76b4804bab8e3a4..99f58b3f1a9d3ea69e312c495437eb34cbe2e3dd 100644 (file)
@@ -1494,7 +1494,7 @@ free_hstat (struct http_stat *hs)
    server, and u->url will be requested.  */
 static uerr_t
 gethttp (struct url *u, struct http_stat *hs, int *dt, struct url *proxy,
-         struct iri *iri)
+         struct iri *iri, int count)
 {
   struct request *req;
 
@@ -2468,7 +2468,7 @@ File %s already there; not retrieving.\n\n"), quote (hs->local_file));
       mkalldirs (hs->local_file);
       if (opt.backups)
         rotate_backups (hs->local_file);
-      if (hs->restval)
+      if (hs->restval || count > 0)
         {
 #ifdef __VMS
           int open_id;
@@ -2756,7 +2756,7 @@ Spider mode enabled. Check if remote file exists.\n"));
         *dt &= ~SEND_NOCACHE;
 
       /* Try fetching the document, or at least its head.  */
-      err = gethttp (u, &hstat, dt, proxy, iri);
+      err = gethttp (u, &hstat, dt, proxy, iri, count);
 
       /* Time?  */
       tms = datetime_str (time (NULL));