httpsrr: fix port detection

Closes #16409
This commit is contained in:
Dexter Gerig 2025-02-20 12:57:02 -06:00 committed by Daniel Stenberg
parent 655a4e83b7
commit 6bc65a444b
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2
2 changed files with 2 additions and 0 deletions

View File

@ -843,6 +843,7 @@ struct Curl_addrinfo *Curl_resolver_getaddrinfo(struct Curl_easy *data,
{ {
res->num_pending++; /* one more */ res->num_pending++; /* one more */
memset(&res->hinfo, 0, sizeof(struct Curl_https_rrinfo)); memset(&res->hinfo, 0, sizeof(struct Curl_https_rrinfo));
res->hinfo->port = -1;
ares_query_dnsrec((ares_channel)data->state.async.resolver, ares_query_dnsrec((ares_channel)data->state.async.resolver,
hostname, ARES_CLASS_IN, hostname, ARES_CLASS_IN,
ARES_REC_TYPE_HTTPS, ARES_REC_TYPE_HTTPS,

View File

@ -412,6 +412,7 @@ static CURLcode resolve_httpsrr(struct Curl_easy *data,
return CURLE_FAILED_INIT; return CURLE_FAILED_INIT;
memset(&async->thdata.hinfo, 0, sizeof(struct Curl_https_rrinfo)); memset(&async->thdata.hinfo, 0, sizeof(struct Curl_https_rrinfo));
async->thdata.hinfo.port = -1;
ares_query_dnsrec(async->thdata.channel, ares_query_dnsrec(async->thdata.channel,
async->hostname, ARES_CLASS_IN, async->hostname, ARES_CLASS_IN,
ARES_REC_TYPE_HTTPS, ARES_REC_TYPE_HTTPS,