]> sjero.net Git - wget/blobdiff - src/retr.c
[svn] Fixed problem with recursive FTP retrieval.
[wget] / src / retr.c
index 469433ca312eebca16a78df17aeac1f10abced8c..a2d462a87b34a206c6875e678b11d16fcd7b4de2 100644 (file)
@@ -844,7 +844,7 @@ retrieve_from_file (const char *file, bool html, int *count)
          break;
        }
       if ((opt.recursive || opt.page_requisites)
-         && (cur_url->url->scheme != SCHEME_FTP || opt.use_proxy))
+         && (cur_url->url->scheme != SCHEME_FTP || getproxy (cur_url->url)))
        {
          int old_follow_ftp = opt.follow_ftp;
 
@@ -1022,6 +1022,20 @@ getproxy (struct url *u)
   return proxy;
 }
 
+/* Returns true if URL would be downloaded through a proxy. */
+
+bool
+url_uses_proxy (const char *url)
+{
+  bool ret;
+  struct url *u = url_parse (url, NULL);
+  if (!u)
+    return false;
+  ret = getproxy (u) != NULL;
+  url_free (u);
+  return ret;
+}
+
 /* Should a host be accessed through proxy, concerning no_proxy?  */
 static bool
 no_proxy_match (const char *host, const char **no_proxy)