Re: Just annooyng Bug...

Hrvoje Niksic <[email protected]>
Newsgroups gmane.comp.web.wget.patches
Message-ID <[email protected]>
[email protected] (Larry Jones) writes:

> Doesn't that allow -p to recurse infinitely instead of limiting it
> to just two additional levels?

No, the check at line 295 remains in effect.

This check only makes sure that, when -p is in use, we treat all HTMLs
as "non-leaf" for the purpose of (temporarily) downloading them
regardless of -R/-A.

The logic of "check 6" is something like:

+ normally, download the file in accordance with -R/-A
  + UNLESS the document is HTML, in which case -R/-A are temporarily
    ignored; the file is downloaded, harvested for links, and (in case
    it actually conflicts with -R/-A) later deleted.
    + UNLESS the document is a "leaf HTML", i.e. HTML at the leaf of
      the recursion pseudo-tree, in which case there is no need to
      download it.

When -p is in use, no HTML is really "leaf" because we probably want
to get its requisites.  If this proves not to be the case, it will be
deleted anyway.

Your version of the check explicitly allowed two more levels of depth
for the -p case, but it made the check more complex and prone to error
in case the logic on line 295 ever changes (for instance by allowing
more than one level of frame loading).
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.