]> granicus.if.org Git - curl/commitdiff
CURLOPT_DNS_USE_GLOBAL_CACHE: deprecated
authorDaniel Stenberg <daniel@haxx.se>
Tue, 4 Sep 2018 22:05:46 +0000 (00:05 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 6 Sep 2018 06:24:54 +0000 (08:24 +0200)
Disable the CURLOPT_DNS_USE_GLOBAL_CACHE option and mark it for
deprecation and complete removal in six months.

Bug: https://curl.haxx.se/mail/lib-2018-09/0010.html
Closes #2942

docs/DEPRECATE.md
lib/setopt.c

index eefcf839f656909ec24f4a23b17ceef30afe8b79..73ae92ffdf839a6a4a719454855f0f9201f53590 100644 (file)
@@ -70,3 +70,24 @@ libcurl code.
 Left to answer: should the *setopt() function start to return error when these
 options are set to be able to tell when they're trying to use options that are
 no longer around or should we maintain behavior as much as possible?
+
+## CURLOPT_DNS_USE_GLOBAL_CACHE
+
+This option makes libcurl use a global non-thread-safe cache for DNS if
+enabled. The option has been marked as "obsolete" in the header file and in
+documentation for several years already.
+
+There's proper and safe method alternative provided since many years: the
+share API.
+
+### State
+
+In curl 7.62.0 setting this option to TRUE will not have any effect. The
+global cache will not be enabled. The code still remains so it is easy to
+revert if need be.
+
+### Removal
+
+Remove all global-cache related code from curl around April 2019 (might be
+7.66.0).
+
index f2fadc7867b48094fe349bf28c6cc6949ba5fbd5..66636a2da2eee6103ad8ccaccddf70b82d17145f 100644 (file)
@@ -127,9 +127,11 @@ CURLcode Curl_vsetopt(struct Curl_easy *data, CURLoption option,
     data->set.dns_cache_timeout = arg;
     break;
   case CURLOPT_DNS_USE_GLOBAL_CACHE:
+#if 0 /* deprecated */
     /* remember we want this enabled */
     arg = va_arg(param, long);
     data->set.global_dns_cache = (0 != arg) ? TRUE : FALSE;
+#endif
     break;
   case CURLOPT_SSL_CIPHER_LIST:
     /* set a list of cipher we want to use in the SSL connection */