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;
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)