http: the client reads the HTTPS record of an origin (step 2 of #71) #558
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Goal
Step 2 of #71: a
Clientwith aresolverreads theHTTPSrecord (RFC 9460) of anhttpsorigin and connects the way the record says. Step 1 (#525, PR #527) landedNameResolverand theClient.resolveroption; this step uses it.Rules
For an
httpsorigin and a client whoseresolverisSome:HTTPSrecord of the host: owner name<host>where the port is 443,_<port>._https.<host>otherwise (RFC 9460 section 9.5). An IP literal asks nobody. A client without a resolver behaves as before..) means "no usable record". ServiceMode records are tried by ascending priority (stable among equal priorities); the first usable one decides.portreplaces the origin's port for the connection only; theHostheader and the TLS server name keep the origin's.alpn(plus the defaulthttp/1.1unlessno-default-alpn) is intersected with what the client supports and offered throughTlsSettings.protocols. Untilh2exists (#72) the client supportshttp/1.1only; a record that offers nothing the client supports is unusable.ipv4hint/ipv6hintare used only whenA/AAAAof the connection target answer nothing (RFC 9460 section 7.3).mandatorylists a key the client does not understand, or any key the client does not implement: the record is unusable.echand the other keys are ignored here (own issues)..means the origin's own host (RFC 9460 section 2.5.2).Acceptance criteria
A new conformance test,
tests/conformance/http-client-https-record.trb, runs a name server and an HTTPS server in one program (astests/conformance/dns-over-https.trbdoes) and, in the VM and with--native, proves each rule above with at least:portredirects the connection whileHoststays the origin's;alpnlist reaches the server in the handshake (andno-default-alpnremoveshttp/1.1);A/AAAAare empty;SERVFAIL, and amandatorykey the client does not know each give today's behaviour, and the request succeeds;_<port>._https.<host>.tools/gates.sh aandbgreen in forge CI. DNS.md section 7 and the slice 7 row are updated to "built" for the client part (h2stays "after #72");skills/regenerated.Design record / seed
Implements DNS.md slice 7 and section 7. Seed: no (std only, in
std/http; no syntax, no native, no string lookup by the compiler).Size
One PR, one or two Conventional Commits (for example
feat(http): the client reads the HTTPS record of an origin,docs(dns): ...).Dependencies
Step 1 #525 (landed). Not blocked by #72: until then only
http/1.1is offered.[loop:torbscript] claim implement by session:loop-torbscript-20261029 until 2026-10-29T05:22:42Z
[loop:torbscript] release implement: the worker was lost with its execution context (gateway event, not a usage limit). State is on Forgejo: PR #561 (loop/558-http-client-https-record at
01ec6268). Respawning on the same profile to read forge CI and fix red lanes caused by this change, next: implement[loop:torbscript] claim implement by session:loop-torbscript-20261029 until 2026-10-29T06:24:25Z
[loop:torbscript] release implement: the worker was lost with its execution context again (gateway event, not a usage limit). PR #561 is open at
01ec6268and its forge CI is running; nothing left to do until it reports. next: waiting (forge CI on PR #561); a red lane caused by this change gets a fix worker[loop:torbscript] claim fix by session:loop-torbscript-20261029 until 2026-10-29T04:14:34Z
[loop:torbscript] release fix: the fix worker was lost with its execution context (gateway event, not a usage limit) after pushing
6a2218b4(fix(http): the binding module doc names Client without a link) to PR #561; forge CI on it is running. next: waiting (forge CI on PR #561); a red lane caused by this change gets a fix worker with a fresh claim.