]> sjero.net Git - wget/commitdiff
[svn] Fixed recursive FTP retrieval over proxy.
authormtortonesi <devnull@localhost>
Mon, 12 Jun 2006 16:26:28 +0000 (09:26 -0700)
committermtortonesi <devnull@localhost>
Mon, 12 Jun 2006 16:26:28 +0000 (09:26 -0700)
src/ChangeLog
src/main.c
src/retr.c

index 9b9ffcf4b4e5c9fb07fa89864856eb43a198420d..87bb27b2927112b7318f7455fb23d0e8617edd9a 100644 (file)
@@ -1,3 +1,21 @@
+2006-06-12  Mauro Tortonesi  <mauro@ferrara.linux.it>
+
+       * retr.c (retrieve_from_file): Use retrieve_tree and automatically
+       turn on opt.follow_ftp in case of recursive FTP retrieval through HTTP
+       proxy.
+
+       * main.c: Automatically turn on opt.follow_ftp in case of recursive
+       FTP retrieval through HTTP proxy.
+
+2006-06-12  Tony Lewis  <tlewis@exelana.com>
+
+       * main.c: Improved CHEN Peng's patch by proposing a simpler logic.
+
+2006-06-12  CHEN Peng  <chenpeng@alumni.nus.edu.sg>
+
+       * main.c: Use retrieve_tree in case of recursive FTP retrieval through
+       HTTP proxy.
+
 2006-05-25  Mauro Tortonesi  <mauro@ferrara.linux.it>
 
        * convert.c: Added mechanisms to keep track broken links.
index 9bc979aa6c0eb5174bc9ff4b8bd4008f7fb9060e..e84efddcad92cffe3f940d10fa1f6a798b24fb8f 100644 (file)
@@ -945,8 +945,18 @@ Can't timestamp and not clobber old files at the same time.\n"));
       int dt;
 
       if ((opt.recursive || opt.page_requisites)
-         && url_scheme (*t) != SCHEME_FTP)
-       status = retrieve_tree (*t);
+         && (url_scheme (*t) != SCHEME_FTP || opt.use_proxy))
+       {
+         int old_follow_ftp = opt.follow_ftp;
+
+         /* Turn opt.follow_ftp on in case of recursive FTP retrieval */
+         if (url_scheme (*t) == SCHEME_FTP) 
+           opt.follow_ftp = 1;
+         
+         status = retrieve_tree (*t);
+
+         opt.follow_ftp = old_follow_ftp;
+       }
       else
        status = retrieve_url (*t, &filename, &redirected_URL, NULL, &dt, opt.recursive);
 
index 18a7b3233817e1c6786284b5a1d472fbed2655cf..7c6b1f2160f9bcb4389bf1448f6d4ff87c14c5af 100644 (file)
@@ -844,8 +844,18 @@ retrieve_from_file (const char *file, bool html, int *count)
          break;
        }
       if ((opt.recursive || opt.page_requisites)
-         && cur_url->url->scheme != SCHEME_FTP)
-       status = retrieve_tree (cur_url->url->url);
+         && (cur_url->url->scheme != SCHEME_FTP || opt.use_proxy))
+       {
+         int old_follow_ftp = opt.follow_ftp;
+
+         /* Turn opt.follow_ftp on in case of recursive FTP retrieval */
+         if (cur_url->url->scheme == SCHEME_FTP) 
+           opt.follow_ftp = 1;
+         
+         status = retrieve_tree (cur_url->url->url);
+
+         opt.follow_ftp = old_follow_ftp;
+       }
       else
        status = retrieve_url (cur_url->url->url, &filename, &new_file, NULL, &dt, opt.recursive);