X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=php_http_client_curl.c;h=3b4d5b187ca3e9efe328be60871eb0e00fefad07;hb=68902d1bedcc8c23f8907d023d325ce8a40196c1;hp=0b9a4d3486020d0c64be2a9359e7b9c487695e81;hpb=73c32b927492da067bb42ad2d9add0d19081f411;p=m6w6%2Fext-http diff --git a/php_http_client_curl.c b/php_http_client_curl.c index 0b9a4d3..3b4d5b1 100644 --- a/php_http_client_curl.c +++ b/php_http_client_curl.c @@ -410,17 +410,6 @@ static STATUS php_http_curle_get_info(CURL *ch, HashTable *info) add_assoc_zval_ex(&array, "ssl_engines", sizeof("ssl_engines"), subarray); curl_slist_free_all(s); } - if (CURLE_OK == curl_easy_getinfo(ch, CURLINFO_COOKIELIST, &s)) { - MAKE_STD_ZVAL(subarray); - array_init(subarray); - for (p = s; p; p = p->next) { - if (p->data) { - add_next_index_string(subarray, p->data, 1); - } - } - add_assoc_zval_ex(&array, "cookies", sizeof("cookies"), subarray); - curl_slist_free_all(s); - } if (CURLE_OK == curl_easy_getinfo(ch, CURLINFO_REDIRECT_URL, &c)) { add_assoc_string_ex(&array, "redirect_url", sizeof("redirect_url"), c ? c : "", 1); } @@ -1210,6 +1199,13 @@ static void php_http_curle_options_init(php_http_options_t *registry TSRMLS_DC) } #endif +#if PHP_HTTP_CURL_VERSION(7,40,0) + if ((opt = php_http_option_register(registry, ZEND_STRL("unix_socket_path"), CURLOPT_UNIX_SOCKET_PATH, IS_STRING))) { + opt->flags |= PHP_HTTP_CURLE_OPTION_CHECK_STRLEN; + opt->flags |= PHP_HTTP_CURLE_OPTION_CHECK_BASEDIR; + } +#endif + /* dns */ if ((opt = php_http_option_register(registry, ZEND_STRL("dns_cache_timeout"), CURLOPT_DNS_CACHE_TIMEOUT, IS_LONG))) { Z_LVAL(opt->defval) = 60;