Hrvoje Niksic wrote:
>
> Thomas Reinke <[EMAIL PROTECTED]> writes:
>
> > Ok, either I've completely misread wget, or it has a problem
> > mirroring SSL sites. It appears that it is deciding that the
> > https:// scheme is something that is "not to be followed".
>
> That's a bug. Your patch is close to how it should be fixed, with two
> pending issues:
>
> * SCHEME_HTTPS is undefined when SSL is not used. The identifier
> shouldn't be used unconditionally.
>
> * Should we have a "scheme_http_like" property and test for it instead
> of using "u->scheme == SCHEME_HTTP || u->scheme == SCHEME_HTTPS"?
Does raise an interesting question re
a bug introduced by the patch - is https://HOST the the same host
when it is referred to as http://HOST? Had found another problem
introduced by the patch where u->scheme was tested against
parent->scheme without any reference to what scheme is being used
(download_child_p, section 7.) The following fixed it, assumes
that the two are different. If you decide the two are the same,
then a single scheme as you propose works. If the two are different,
then you probably need to propogate tests for the two different
schemes throughout the code as I did originally.
/* 7. */
if ((u->scheme == parent->scheme) ||
(u->scheme==SCHEME_HTTP && parent->scheme==SCHEME_HTTPS) ||
(u->scheme==SCHEME_HTTPS && parent->scheme==SCHEME_HTTP))
if (!opt.spanhost && 0 != strcasecmp (parent->host, u->host))
{
DEBUGP (("This is not the same hostname as the parent's (%s and
%s).\n",
u->host, parent->host));
goto out;
}
Thomas
--
------------------------------------------------------------
E-Soft Inc. http://www.e-softinc.com
Publishers of SecuritySpace http://www.securityspace.com
Tel: 1-905-331-2260 Fax: 1-905-331-2504
Tollfree in North America: 1-800-799-4831