* A URL can still be saved onto the engine's own temporary files The re-fetch backup and the content-coding temporaries built their names inside the mirror, so a site serving the matching path had its mirrored copy used as scratch and then deleted. #818 escaped hts-cache and hts-tmp as reserved path components, but three shapes still got through (#842): a trailing space that cleanEndingSpaceOrDot() stripped back off after the check, and the first path component, which the table could not see because it anchors on a leading '/' that url_savename has already removed. The latter covers a single-label hostname too, and left the DOS device names equally exposed in that position. The temporaries now live in ~hts-tmp/. url_savename maps '~' to '_' in every name it builds, so nothing a site can serve resolves inside it whatever the escape does; the escape is still fixed, as defence for hts-cache/ itself. The frozen-slot spool (<save>.tmp) shared the collision, plus a heap buffer sized from url_sav that the path_html branch overran, and moves to the same helper. The .delayed placeholder does not: it goes through url_savename's collision detection, so a competing link gets a suffix rather than the file. Closes #774 Closes #842 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Signed-off-by: Xavier Roche <roche@httrack.com> * Scope the reserved-name escape and fix the review blockers Restrict the new first-component match so a hostname label is not rewritten: only a trailing run cleanEndingSpaceOrDot() strips may end the name there, so aux.example.com keeps its name while a single-label hts-tmp host and a path-first hts-cache/ are still escaped. Renaming a host directory would have moved an existing mirror out from under --update --purge-old. Drop the frozen-slot spool rewrite: it carried a pre-existing heap overflow that belongs in its own change. Clear back->tmpfile when structcheck() fails in the named branch, as the unnamed one does. Test 132 now plants a leftover at the exact temporary path, so both a reverted HTS_TMPDIR and a no-op back_refetch_backup fail it; 131 pins the hostname labels. Signed-off-by: Xavier Roche <roche@httrack.com> Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Signed-off-by: Xavier Roche <roche@httrack.com> --------- Signed-off-by: Xavier Roche <roche@httrack.com> Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
HTTrack Website Copier - Development Repository
About
Copy websites to your computer (Offline browser)
HTTrack is an offline browser utility, allowing you to download a World Wide website from the Internet to a local directory, building recursively all directories, getting html, images, and other files from the server to your computer.
HTTrack arranges the original site's relative link-structure. Simply open a page of the "mirrored" website in your browser, and you can browse the site from link to link, as if you were viewing it online.
HTTrack can also update an existing mirrored site, and resume interrupted downloads. HTTrack is fully configurable, and has an integrated help system.
WinHTTrack is the Windows 2000/XP/Vista/Seven release of HTTrack, and WebHTTrack the Linux/Unix/BSD release.
Website
Main Website: http://www.httrack.com/
Compile trunk release
A git checkout ships only the autotools sources, so ./bootstrap (which runs
autoreconf) regenerates configure first; this needs autoconf, automake and
libtool. Released tarballs already include configure, so building from a
tarball skips ./bootstrap.
git clone https://github.com/xroche/httrack.git --recurse-submodules
cd httrack
./bootstrap
./configure --prefix=$HOME/usr && make -j8 && make install
Or use the one-shot wrapper (bootstrap + configure + make), which forwards its
arguments to configure:
./build.sh --prefix=$HOME/usr