mirror of
https://github.com/curl/curl.git
synced 2026-08-26 20:23:32 +03:00
https-rr: implementation improvements
- fold DoH and async HTTPS-RR handling into common code. have common cleanups, etc. Have a CURLcode result in async handling to allow HTTPS RR parsing to fail. - keep target, ipv4hints, ipv6hints, port and echconfig also when resolving via cares. We need to know `target` and `port` when evaluating possible ALPN candidates to not go astray. - add CURL_TRC_DNS for tracing DNS operations - replace DoH specific tracing with DNS, use doh as alias for dns in curl_global_tracea() Closes #16132
This commit is contained in:
parent
db72b8d4d0
commit
1b710381ca
12 changed files with 174 additions and 103 deletions
|
|
@ -585,17 +585,19 @@ CURLcode Curl_resolver_is_resolved(struct Curl_easy *data,
|
|||
Curl_mutex_release(&td->tsd.mutx);
|
||||
|
||||
if(done) {
|
||||
CURLcode result = td->result;
|
||||
getaddrinfo_complete(data);
|
||||
|
||||
if(!data->state.async.dns) {
|
||||
CURLcode result = Curl_resolver_error(data);
|
||||
if(!result && !data->state.async.dns)
|
||||
result = Curl_resolver_error(data);
|
||||
|
||||
if(result) {
|
||||
destroy_async_data(data);
|
||||
return result;
|
||||
}
|
||||
#ifdef USE_HTTPSRR_ARES
|
||||
{
|
||||
struct Curl_https_rrinfo *lhrr =
|
||||
Curl_memdup(&td->hinfo, sizeof(struct Curl_https_rrinfo));
|
||||
struct Curl_https_rrinfo *lhrr = Curl_httpsrr_dup_move(&td->hinfo);
|
||||
if(!lhrr) {
|
||||
destroy_async_data(data);
|
||||
return CURLE_OUT_OF_MEMORY;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue