• exec/load/xtrn_mirror.js xtrn/tests/xtrn_mirror_test.js

    From Rob Swindell (on Debian Linux)@1:103/705 to Git commit to main/sbbs/master on Tue Jul 21 21:53:26 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/2b030be7a3717cf215f68745
    Added Files:
    exec/load/xtrn_mirror.js xtrn/tests/xtrn_mirror_test.js
    Log Message:
    xtrn: add exec/load/xtrn_mirror.js, a mirror-fallback download helper

    Door asset fetchers download game data from a dozen upstream hosts nobody
    here controls. When one goes away, renames a release, or refuses the
    request, the door cannot be installed at all and the sysop's only
    recourse is to find the file by hand. This adds a shared helper that
    retries against Synchronet's asset mirror when the publisher fails.

    The fallback fires on an unreachable host, a non-2xx response, and --
    via the caller's optional verify callback -- a checksum mismatch. That
    last case is the point: without a check, a second source would be
    trusted exactly as blindly as the first, so adding one would weaken
    every fetcher that used it rather than strengthen it.

    HTTPRequest.Download() streams a 404 error body to disk before returning
    0, so a failed attempt removes the file it wrote; otherwise an HTML
    error page would reach Archive() claiming to be a game archive.

    No fetcher calls it yet.
    --- SBBSecho 3.37-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)