Skip to content

Implement Dns.lookup on Dns.newCall for DnsOverHttps#9568

Merged
swankjesse merged 3 commits into
masterfrom
jwilson.0721.lookup_on_call
Jul 21, 2026
Merged

Implement Dns.lookup on Dns.newCall for DnsOverHttps#9568
swankjesse merged 3 commits into
masterfrom
jwilson.0721.lookup_on_call

Conversation

@swankjesse

Copy link
Copy Markdown
Collaborator

The lookup path is no longer exercised by OkHttp itself.

This reduces potential drift between the two strategies.

The lookup path is no longer exercised by OkHttp itself.

This reduces potential drift between the two strategies.
* Call our asynchronous API synchronously.
*
* This returns normally if at least one [Dns.Record.IpAddress] is returned. Partial failures are
* silently ignored.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This behaviour change impacts RoutePlanner! (RoutePlanner currently calls through this execute function.)

Comment thread okhttp-dnsoverhttps/src/test/java/okhttp3/dnsoverhttps/DnsOverHttpsTest.kt Outdated
)
val call = withoutServiceMetadata.newCall(Dns.Request(hostname))
val records = call.execute()
return records.filterIsInstance<Dns.Record.IpAddress>()

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lovely.

swankjesse and others added 2 commits July 21, 2026 11:29
…HttpsTest.kt

Co-authored-by: Yuri Schimke <yuri@schimke.ee>
@swankjesse
swankjesse merged commit b2cbae7 into master Jul 21, 2026
4 checks passed
@swankjesse
swankjesse deleted the jwilson.0721.lookup_on_call branch July 21, 2026 15:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants