]> sjero.net Git - wget/commitdiff
Now --no-parent doesn't fetch wrong files if HTTP and HTTPS are used together.
authorGiuseppe Scrivano <gscrivano@gnu.org>
Wed, 30 Mar 2011 23:37:12 +0000 (01:37 +0200)
committerGiuseppe Scrivano <gscrivano@gnu.org>
Wed, 30 Mar 2011 23:37:12 +0000 (01:37 +0200)
NEWS
src/ChangeLog
src/recur.c

diff --git a/NEWS b/NEWS
index 5a3cc2fa29a1e41512eb6692f2b6e9ff30844802..16f18640df1135be1872e3bcdc6025763912cda2 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -59,6 +59,9 @@ Please send GNU Wget bug reports to <bug-wget@gnu.org>.
    in .htm.
 
 ** Support HTTP/1.1 307 redirects keep request method.
+
+** Now --no-parent doesn't fetch undesired files if HTTP and HTTPS are used
+   by the same host on different pages.
 \f
 * Changes in Wget 1.12
 
index 3af0e335029a6b85a30c85ec7d73ae8aba472086..9d08bc6bef5f0fa0e5ab02219bc499f98308a931 100644 (file)
@@ -1,5 +1,9 @@
 2011-03-31  Giuseppe Scrivano  <gscrivano@gnu.org>
 
+       * recur.c (download_child_p): When --no-parent is used, check that the
+       ports are the same only in case the same protocol is used.
+       Reported by: Karl Berry <karl@freefriends.org>
+
        * res.c (res_parse): Add new line to debug messages.
 
 2011-03-21  Giuseppe Scrivano  <gscrivano@gnu.org>
index 00e7603163c1b2be1998c0f7dc74339af35253fc..139fe2e3978d2ecff6b02255153a1d664494802a 100644 (file)
@@ -563,7 +563,8 @@ download_child_p (const struct urlpos *upos, struct url *parent, int depth,
   if (opt.no_parent
       && schemes_are_similar_p (u->scheme, start_url_parsed->scheme)
       && 0 == strcasecmp (u->host, start_url_parsed->host)
-      && u->port == start_url_parsed->port
+      && (u->scheme != start_url_parsed->scheme
+          || u->port == start_url_parsed->port)
       && !(opt.page_requisites && upos->link_inline_p))
     {
       if (!subdir_p (start_url_parsed->dir, u->dir))