Skip to content

Prefix http:// on a seed whose path holds :/ - #2095

Merged
xroche merged 3 commits into
masterfrom
fz/B9
Nov 7, 2026
Merged

xroche merged 3 commits into
masterfrom
fz/B9

Conversation

@xroche

@xroche xroche commented Nov 7, 2026

Copy link
Copy Markdown
Owner

A start URL without a scheme now gets http:// even when its path or query holds :/, for example example.com/go?u=http://x. Before, httrack took such a seed as a relative link under the host primary and fetched nothing. The command line, -%L, login bundles and --why now share one test built on link_has_authority, and a //host seed keeps the http:// it got before.

Test 752 crawls such a seed through each of the four paths and fails on master. Putting the old test back at any one site also makes it fail.

xroche and others added 3 commits November 7, 2026 18:44
A start URL without a scheme was tested with strstr(":/"), so a seed
like host/page?u=http://x got no http:// and was crawled as a relative
link under "primary". The four seed sites (command line, -%L, login
bundles, --why) now share seed_needs_scheme(), built on
link_has_authority(); a "//host" seed keeps its old prefix.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Xavier Roche <roche@httrack.com>
An indented -%L line such as '  http://host/x' found its scheme on
master, because strstr(":/") searched the whole string. The new test
only looked at byte 0 and prefixed http://, so the seed fetched nothing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Xavier Roche <roche@httrack.com>
The command line escapes a seed's leading space to %20 before the engine
sees it, so " http://host/" still got a second http:// and fetched
nothing. Test 752 now crawls such an argv seed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Xavier Roche <roche@httrack.com>
@xroche
xroche enabled auto-merge (squash) November 7, 2026 19:05
@xroche
xroche merged commit 65e85fd into master Nov 7, 2026
39 checks passed
@xroche
xroche deleted the fz/B9 branch November 7, 2026 21:17
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.

1 participant