+#if PHP_HTTP_CURL_VERSION(7,21,3)
+ if (curl->options.resolve) {
+ curl_slist_free_all(curl->options.resolve);
+ curl->options.resolve = NULL;
+ }
+ if ((zoption = get_option(&curl->options.cache, options, ZEND_STRS("resolve"), IS_ARRAY))) {
+ php_http_array_hashkey_t key = php_http_array_hashkey_init(0);
+ HashPosition pos;
+ zval **data;
+
+ FOREACH_KEYVAL(pos, zoption, key, data) {
+ zval *cpy = php_http_ztyp(IS_STRING, *data);
+
+ curl->options.resolve = curl_slist_append(curl->options.resolve, Z_STRVAL_P(cpy));
+
+ zval_ptr_dtor(&cpy);
+ }
+ }
+#endif
+#if PHP_HTTP_CURL_VERSION(7,24,0)
+ if ((zoption = get_option(&curl->options.cache, options, ZEND_STRS("dns_servers"), IS_STRING)) && Z_STRLEN_P(zoption)) {
+ curl_easy_setopt(ch, CURLOPT_DNS_SERVERS, Z_STRVAL_P(zoption));
+ }
+#endif