From: Daniel Stenberg Date: Sat, 22 Jun 2024 20:50:15 +0000 (+0200) Subject: CURLOPT_RESOLVE.md: mention hostname can be wildcard ('*') X-Git-Tag: curl-8_9_0~213 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b84699bf4f8cfac8369df82e77a0da2784785689;p=thirdparty%2Fcurl.git CURLOPT_RESOLVE.md: mention hostname can be wildcard ('*') Closes #13983 --- diff --git a/docs/libcurl/opts/CURLOPT_RESOLVE.md b/docs/libcurl/opts/CURLOPT_RESOLVE.md index 800e3a82db..ff1b50bb46 100644 --- a/docs/libcurl/opts/CURLOPT_RESOLVE.md +++ b/docs/libcurl/opts/CURLOPT_RESOLVE.md @@ -45,13 +45,17 @@ numerical IP addresses. If you specify multiple IP addresses they need to be separated by comma. If libcurl is built to support IPv6, each of the ADDRESS entries can of course be either IPv4 or IPv6 style addressing. +Specify the host as a single ampersand (`*`) to match all names. This wildcard +is resolved last so any resolve with a specific host and port number is given +priority. + This option effectively populates the DNS cache with entries for the host+port pair so redirects and everything that operations against the HOST+PORT instead use your provided ADDRESS. -The optional leading "+" specifies that the new entry should time-out. Entries -added without the leading plus character never times out whereas entries added -with "+HOST:..." times out just like ordinary DNS cache entries. +The optional leading plus (`+`) specifies that the new entry should timeout. +Entries added without the leading plus character never times out whereas +entries added with `+HOST:...` times out just like ordinary DNS cache entries. If the DNS cache already has an entry for the given host+port pair, the new entry overrides the former one. @@ -62,7 +66,7 @@ setting of CURLOPT_IPRESOLVE(3) to a different IP version. To remove names from the DNS cache again, to stop providing these fake resolves, include a string in the linked list that uses the format -~~~c +~~~ -HOST:PORT ~~~