Happy Eyeballs: add resolution time delay

HEv3 describes conditions on when first connect attempts shall be
started.
https://www.ietf.org/archive/id/draft-ietf-happy-happyeyeballs-v3-01.html
Chapter 4.2

libcurl now waits 50ms for AAAA and HTTPS results (when requested) to
return before continuing with the connect.

Added HTTPS-RR to the "was resolved" information info message. Changed
logging of HTTPS-RR to a one-liner with RFC 9460 like formatting. This
way the user can see if/what was resolved and used in connecting.

Closes #21354
This commit is contained in:
Stefan Eissing 2026-04-17 10:26:25 +02:00 committed by Daniel Stenberg
parent 70a159527c
commit 809dda3a37
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
13 changed files with 272 additions and 158 deletions

View file

@ -35,6 +35,7 @@
#define MAX_HTTPSRR_ALPNS 4
struct Curl_easy;
struct dynbuf;
struct Curl_https_rrinfo {
char *rrname; /* if NULL, the same as the URL hostname */
@ -59,7 +60,7 @@ struct Curl_https_rrinfo {
BIT(complete); /* values have been successfully assigned */
};
CURLcode Curl_httpsrr_set(struct Curl_https_rrinfo *hi,
CURLcode Curl_httpsrr_set(struct Curl_https_rrinfo *rr,
uint16_t rrkey, const uint8_t *val, size_t vlen);
struct Curl_https_rrinfo *Curl_httpsrr_dup_move(
@ -67,6 +68,11 @@ struct Curl_https_rrinfo *Curl_httpsrr_dup_move(
void Curl_httpsrr_cleanup(struct Curl_https_rrinfo *rrinfo);
/* TRUE if the record is applicable to the transfer and its connection. */
bool Curl_httpsrr_applicable(struct Curl_easy *data,
const struct Curl_https_rrinfo *rr);
/*
* Code points for DNS wire format SvcParams as per RFC 9460
*/
@ -84,8 +90,11 @@ CURLcode Curl_httpsrr_from_ares(const ares_dns_record_t *dnsrec,
#endif /* USE_ARES */
#ifdef CURLVERBOSE
CURLcode Curl_httpsrr_print(struct dynbuf *tmp,
struct Curl_https_rrinfo *rr);
void Curl_httpsrr_trace(struct Curl_easy *data,
struct Curl_https_rrinfo *hi);
struct Curl_https_rrinfo *rr);
#else
#define Curl_httpsrr_trace(a, b) Curl_nop_stmt
#endif