The request Accept-Encoding offered only gzip even though the response parser already recognized deflate/x-deflate. But the actual decode path (hts_zunpack) used zlib's gzread, which only inflates gzip and copies any deflate body through verbatim, so a deflate response would have been written out still compressed. Advertising deflate without fixing that would corrupt files. Rewrite hts_zunpack to inflate via inflateInit2 with format detection: gzip and zlib (RFC1950) auto-detect with +32 windowBits, everything else is treated as raw deflate (RFC1951). Then add deflate to the advertised list through a small hts_acceptencoding() helper shared with the test. A new -#test=acceptencoding self-test asserts the advertised header carries both gzip and deflate, and round-trips gzip, zlib and raw-deflate bodies through hts_zunpack on disk. Both halves fail on the old binary. Brotli is intentionally out of scope (new dependency, larger change). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Signed-off-by: Xavier Roche <roche@httrack.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