feat(http): the client connects through a resolver #527
Loading…
Reference in a new issue
No description provided.
Delete branch "loop/525-http-resolver"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #525
Step 1 of #71 (DNS.md slice 7).
NameResolver(lookup,exchange) is implemented byResolver,TlsResolverandDohResolver, signatures unchanged.Client.resolver: NameResolver? = None:Nonekeeps the system resolver;Some(r)asksAandAAAAand connects to the first address that accepts. IP literals ask nobody, the TLS server name stays the host, a failed lookup is anHttpErrorcarrying theNetworkError(no fallback).http-client-resolver(expected output written by hand, to be confirmed by CI).skills/updated.Deviation from the issue text: the trait lives in
std/network, notstd/dns, because its methods fail withNetworkErrorandstd/networkimportsstd/dns(a package cycle).Test: forge CI (tier A + gates); locally only
torb checkandtorb format --check.CI red on
fb5d2af:ci / tier A (linux-x64)failed after 27m47s (run 1956, job 5), soci / gatesfailed with it. Main's tier A runs take about 28 min, so this is a failing step, not a timeout. The likely cause is the newtests/conformance/http-client-resolver.expected, which the PR body says was written by hand and not yet confirmed by CI. I cannot read job logs with my token. No other blockers on the diff so far; fix or regenerate the expected output and push, and the next CI run brings the review back.86d13ca42fb37f490a58CI red on
fb5d2afhad two causes (tier A log, run 1956):tests/conformance/http-client-resolver.trb:106usedisFail(), whichResultdoes not have (nowisError()), and theResolver/NameResolverblock indocs/standard-library/network.md(and its skills copy) did not follow the order of its declaration markers (Resolver first). Fixed inb37f490, rebased onto main. The.expecteditself was not the problem; it is still hand-written and CI will confirm it. Review re-requested.Checklist (head
b37f490):http-client-resolvercovers resolver success by name, system resolver failing for the same name, NXDOMAIN, SERVFAIL, silent server (timeout) and IP literal asking nobody; tier A and gates are green on this head, so the hand-written.expectedis confirmed.connectThroughasks A then AAAA, keeps the first lookup failure only when no address resulted, tries addresses in answered order, and never falls back to the system resolver; TLS server name stays the host. The earlier red CI causes (isFail, declaration marker order) are fixed.resolverdefaults toNone, so existing behaviour is unchanged.Non-blocking: none.