|
|
|
@ -1851,7 +1851,9 @@ static void _php_curl_set_default_options(php_curl *ch) |
|
|
|
curl_easy_setopt(ch->cp, CURLOPT_INFILE, (void *) ch); |
|
|
|
curl_easy_setopt(ch->cp, CURLOPT_HEADERFUNCTION, curl_write_header); |
|
|
|
curl_easy_setopt(ch->cp, CURLOPT_WRITEHEADER, (void *) ch); |
|
|
|
#if !defined(ZTS) |
|
|
|
curl_easy_setopt(ch->cp, CURLOPT_DNS_USE_GLOBAL_CACHE, 1); |
|
|
|
#endif |
|
|
|
curl_easy_setopt(ch->cp, CURLOPT_DNS_CACHE_TIMEOUT, 120); |
|
|
|
curl_easy_setopt(ch->cp, CURLOPT_MAXREDIRS, 20); /* prevent infinite redirects */ |
|
|
|
|
|
|
|
@ -2183,6 +2185,12 @@ static int _php_curl_setopt(php_curl *ch, zend_long option, zval *zvalue) /* {{{ |
|
|
|
return 1; |
|
|
|
} |
|
|
|
#endif |
|
|
|
# if defined(ZTS) |
|
|
|
if (option == CURLOPT_DNS_USE_GLOBAL_CACHE) { |
|
|
|
php_error_docref(NULL TSRMLS_CC, E_WARNING, "CURLOPT_DNS_USE_GLOBAL_CACHE cannot be activated when thread safety is enabled"); |
|
|
|
return 1; |
|
|
|
} |
|
|
|
# endif |
|
|
|
error = curl_easy_setopt(ch->cp, option, lval); |
|
|
|
break; |
|
|
|
case CURLOPT_SAFE_UPLOAD: |
|
|
|
|