aboutsummaryrefslogtreecommitdiff
path: root/lib/url.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/url.c')
-rw-r--r--lib/url.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/url.c b/lib/url.c
index 5f7568005..56e7fa73f 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -284,6 +284,15 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option, ...)
va_start(param, option);
switch(option) {
+ case CURLOPT_DNS_USE_GLOBAL_CACHE: {
+ int use_cache = va_arg(param, int);
+ if (use_cache) {
+ Curl_global_host_cache_init();
+ }
+
+ data->set.global_dns_cache = use_cache;
+ }
+ break;
case CURLOPT_SSL_CIPHER_LIST:
/* set a list of cipher we want to use in the SSL connection */
data->set.ssl.cipher_list = va_arg(param, char *);