curl / Mailing Lists / curl-library / Single Mail


a couple of questions re CURLOPT_RESOLVE

From: Vadim Grinshpun <>
Date: Fri, 30 Dec 2016 10:23:28 -0500


I'm looking to make use of CURLOPT_RESOLVE, and would like to get a
couple clarifications on its semantics.

The basic question is this: is the list that the application provides as
the argument to CURLOPT_RESOLVE
treated as incremental updates to an internal DNS cache, or is it
effectively the cache itself?

Or, more specifically:

1: what is the expected lifetime of the list? Can it be freed
immediately after the curl_easy_setopt(h, CURLOPT_RESOLVE,list) call
(The example seems to imply that the list needs to persist while a
handle is using it; however this is not explicitly stated anywhere I
could find).

2. If the list must persist after the setopt call: how should updates be
handled? E.g.:
  - providing a new list to curl
  - updating the existing list, still having to call ...setopt()
  - updating the existing list, expecting curl to just pick up the
change next time it resolves

Thanks in advance!

List admin:
Received on 2016-12-30