J Scott Jaderholm <[EMAIL PROTECTED]> writes:

> Is there a way to have wget reget the files until it succeeds?

It's a bit weird that the download fails non-deterministically, and it
indicates a serious problem on the server, but as you don't control
it, here is what you can do with Wget:

Yes, it's possible, but you have to change the source.  Doing so is
quite trivial; there is a line in Wget that says:

  /* Return if we have no intention of further downloading.  */
  if (!(*dt & RETROKF) || (*dt & HEAD_ONLY))
    ...

Now, *before* that block, you have to add another if, saying:

  /* Scott's hack */
  if (status == 404)
    return ERROR404_RETRY;

Add ERROR404_RETRY to enum uerr_t in wget.h, and handle it as
"non-fatal" case in http_loop's switch.

Reply via email to