Skip to content

The -o help text promises a generated error page the engine never builds#803

Merged
xroche merged 2 commits into
masterfrom
fix/o-help-text-787
Jul 27, 2026
Merged

The -o help text promises a generated error page the engine never builds#803
xroche merged 2 commits into
masterfrom
fix/o-help-text-787

Conversation

@xroche

@xroche xroche commented Jul 27, 2026

Copy link
Copy Markdown
Owner

-o never generated anything. It only decides whether the error page the server sent survives: htsparse.c sets store_errpage so the normal save path writes r.adr, and the -o0 arm frees it instead. The block that would have built a stand-in body was dead since the 3.20.2 import and went away in #783. A crawl against the test server's 404 settles it: under -o1 the mirrored file is the server's body verbatim, with no HTTrack footer, and under -o0 there is no file at all.

The doc side is therefore the wrong one. The help line, the regenerated man page and its html render, fcguide's four copies of the option line and its two prose blocks, and the matching sentence in html/step9_opt5.html now say the server's error page is saved rather than generated. The --generate-errors / --do-not-generate-errors aliases and the GUI labels in lang/*.txt ("No error pages", "Do not create HTML error pages", 30 files) keep their wording: renaming a CLI alias breaks scripts, and re-translating 30 files for one word is not worth it.

23_local-errpage.test now asserts the mirrored 404 holds the server's own body and does not hold "HTTrack", which makes the corrected wording a tested claim. A third assertion checks that good.html does hold "HTTrack" from its footer, so the negative is not vacuous; inverting it fails the test.

Closes #787

xroche and others added 2 commits July 27, 2026 13:39
`-o` only decides whether the error page the server sent survives: `store_errpage`
keeps `r.adr` alive so the normal save path writes it, and the `-o0` arm frees it.
Nothing anywhere builds a stand-in body. The one block that would have was dead
since the 3.20.2 import and was removed in #783.

Reword the help line, the man page and fcguide's two `-o` prose blocks to say the
server's error page is saved rather than generated, and extend 23_local-errpage
so the mirrored 404 has to carry the server's own body.

Closes #787

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Xavier Roche <roche@httrack.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Xavier Roche <xroche@gmail.com>
@xroche
xroche merged commit bc6c535 into master Jul 27, 2026
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The -o help text promises a generated error page; the engine stores the server's

1 participant