Skip to content

asyn-ares, connects async#21205

Closed
icing wants to merge 2 commits into
curl:masterfrom
icing:asyn-ares-connect
Closed

asyn-ares, connects async#21205
icing wants to merge 2 commits into
curl:masterfrom
icing:asyn-ares-connect

Conversation

@icing
Copy link
Copy Markdown
Contributor

@icing icing commented Apr 2, 2026

Make separate queries for A and AAAA records. Hand out A/AAAA/HTTPS information before all queries are complete. This allows connect attempts to start on the first A or AAAA response received.

@icing icing added the name lookup DNS and related tech label Apr 2, 2026
@github-actions github-actions Bot added the tests label Apr 2, 2026
@icing icing requested a review from bagder April 2, 2026 13:02
Make separate queries for A and AAAA records.
Hand out A/AAAA/HTTPS information before all queries
are complete.
@icing icing force-pushed the asyn-ares-connect branch from 55bbc5d to 1e9eca0 Compare April 7, 2026 12:25
@curl curl deleted a comment from testclutch Apr 7, 2026
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the async DNS resolver behavior (notably the c-ares backend) to issue separate A and AAAA queries and make partial DNS information available earlier, enabling connection attempts to begin as soon as the first relevant DNS response arrives.

Changes:

  • Adjust test skipping so most resolve tests also run under c-ares, while keeping the thread-specific test skipped.
  • Update a DNS cache test case to use a reserved .invalid hostname.
  • Refactor c-ares async resolver to track A and AAAA results separately and expose per-family addrinfo during ongoing resolution, with added DNS trace logging.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
tests/http/test_21_resolve.py Narrows c-ares skip to only the thread-specific resolve test.
tests/data/test2104 Switches test host to .invalid and updates expected DNS query hostnames.
lib/hostip.c Adds more detailed DNS tracing and handles “incomplete” async results without treating them as errors.
lib/asyn.h Updates c-ares async context to store separate A/AAAA results.
lib/asyn-ares.c Implements separate A/AAAA queries, stores per-family results, and exposes partial addrinfo during ongoing resolution.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tests/data/test2104
Comment thread lib/asyn-ares.c
Comment thread lib/asyn-ares.c
Comment thread lib/asyn-ares.c
@bagder bagder closed this in a285407 Apr 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

name lookup DNS and related tech tests

Development

Successfully merging this pull request may close these issues.

3 participants