Repository navigation
Conversation
jump_toport_const() scanned for ':' past the authority, so the parser's default-port strip turned http://h/x:80 into http://h/x and ?u=1:80 into ?u=1. A ']' in the query with no '/' also hid a real authority port. Bound both scans to the authority, which lets the wizard drop its own bound. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Xavier Roche <roche@httrack.com>
An '@' in the query or fragment moved the port search past the '?', so http://h?u=a@b:80 still lost its ':80'. Bound the userinfo search by the authority end inside jump_toport_const. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Xavier Roche <roche@httrack.com>
dc37788 bounded the userinfo '@' search in jump_toport_const by '/?#' while jump_identification_const bounds it by '/' only. A '?' or '#' in the userinfo then put the port before the host, and the wizard scope walk read out of bounds on u:p?w@foo.com:81. Start the port search at the identified host again and bound it there, so the two always agree. The wizard and the proxy paths also treat a port before the host as no port. An '@' in a query (http://h?u=a@b:80) is read as userinfo again, as on master: the engine connects to b:80, and the port now says the same. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Xavier Roche <roche@httrack.com>
Signed-off-by: Xavier Roche <roche@httrack.com>
xroche
enabled auto-merge (squash)
November 7, 2026 19:08
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
jump_toport_constnow looks for the port only in the URL's authority, before the first/,?or#. Before, the parser's default-port strip removed a:80from the path or the query, sohttp://h/x:80becamehttp://h/xand?u=1:80became?u=1.The function is exported (
HTSEXT_API), so its behaviour changes for library users. It now returns NULL forhttp://h/x:80, and it now finds the port inhttp://h:80?x], where the old search for]hid it. The other in-tree callers pass a bare host and see no change, andhts_wizard_host_scopeand the proxy code ignore a port found before the host.Test 393 and the
stripportself-test fail on master and pass here. Against master,tools/parser-diff.shshows only the path and query links added toabsolute.htmlchanging.