From 8324dc8b1a730445e7aa91f62d7f88b8376e4aee Mon Sep 17 00:00:00 2001 From: Paul Groke Date: Thu, 10 Dec 2020 17:38:14 +0100 Subject: dns: extend CURLOPT_RESOLVE syntax for adding non-permanent entries Extend the syntax of CURLOPT_RESOLVE strings: allow using a '+' prefix (similar to the existing '-' prefix for removing entries) to add DNS cache entries that will time out just like entries that are added by libcurl itself. Append " (non-permanent)" to info log message in case a non-permanent entry is added. Adjust relevant comments to reflect the new behavior. Adjust documentation. Extend unit1607 to test the new functionality. Closes #6294 --- lib/hostip.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/hostip.h') diff --git a/lib/hostip.h b/lib/hostip.h index 724a03d7f..18485ec61 100644 --- a/lib/hostip.h +++ b/lib/hostip.h @@ -65,7 +65,7 @@ struct Curl_hash *Curl_global_host_cache_init(void); struct Curl_dns_entry { struct Curl_addrinfo *addr; - /* timestamp == 0 -- CURLOPT_RESOLVE entry, doesn't timeout */ + /* timestamp == 0 -- permanent CURLOPT_RESOLVE entry (doesn't time out) */ time_t timestamp; /* use-counter, use Curl_resolv_unlock to release reference */ long inuse; -- cgit v1.2.1