From 28db25933b05b46085eef597c2ce7fba8894840e Mon Sep 17 00:00:00 2001 From: Giuseppe Scrivano Date: Thu, 31 Mar 2011 01:37:12 +0200 Subject: [PATCH] Now --no-parent doesn't fetch wrong files if HTTP and HTTPS are used together. --- NEWS | 3 +++ src/ChangeLog | 4 ++++ src/recur.c | 3 ++- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 5a3cc2fa..16f18640 100644 --- a/NEWS +++ b/NEWS @@ -59,6 +59,9 @@ Please send GNU Wget bug reports to . 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. * Changes in Wget 1.12 diff --git a/src/ChangeLog b/src/ChangeLog index 3af0e335..9d08bc6b 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,9 @@ 2011-03-31 Giuseppe Scrivano + * 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 + * res.c (res_parse): Add new line to debug messages. 2011-03-21 Giuseppe Scrivano diff --git a/src/recur.c b/src/recur.c index 00e76031..139fe2e3 100644 --- a/src/recur.c +++ b/src/recur.c @@ -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)) -- 2.39.2