X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=src%2Fphp_http_client_curl.c;h=f286324d808cdb5e535a31668d2f4ed44c711e72;hp=ca39e937c6e9678f7401f2713574c34b0eb4b5cb;hb=cb4b67381dd7bc1f9c8bc1c65729ed0e694512ae;hpb=a25866b2177031ae8f5142db8a45fd58dad4e161 diff --git a/src/php_http_client_curl.c b/src/php_http_client_curl.c index ca39e93..f286324 100644 --- a/src/php_http_client_curl.c +++ b/src/php_http_client_curl.c @@ -21,7 +21,7 @@ # include #endif #if PHP_HTTP_HAVE_LIBCURL_GNUTLS -# include +# include #endif typedef struct php_http_client_curl_handler { @@ -1395,6 +1395,7 @@ static void php_http_curle_options_init(php_http_options_t *registry) php_http_option_register(registry, ZEND_STRL("verifystatus"), CURLOPT_SSL_VERIFYSTATUS, _IS_BOOL); #endif php_http_option_register(registry, ZEND_STRL("cipher_list"), CURLOPT_SSL_CIPHER_LIST, IS_STRING); +#if PHP_HTTP_HAVE_LIBCURL_CAINFO if ((opt = php_http_option_register(registry, ZEND_STRL("cainfo"), CURLOPT_CAINFO, IS_STRING))) { opt->flags |= PHP_HTTP_CURLE_OPTION_CHECK_STRLEN; opt->flags |= PHP_HTTP_CURLE_OPTION_CHECK_BASEDIR; @@ -1402,13 +1403,16 @@ static void php_http_curle_options_init(php_http_options_t *registry) ZVAL_PSTRING(&opt->defval, PHP_HTTP_CAINFO); #endif } +#endif +#if PHP_HTTP_HAVE_LIBCURL_CAPATH if ((opt = php_http_option_register(registry, ZEND_STRL("capath"), CURLOPT_CAPATH, IS_STRING))) { opt->flags |= PHP_HTTP_CURLE_OPTION_CHECK_STRLEN; opt->flags |= PHP_HTTP_CURLE_OPTION_CHECK_BASEDIR; #ifdef PHP_HTTP_CAPATH ZVAL_PSTRING(&opt->defval, PHP_HTTP_CAPATH); #endif - } + } +#endif if ((opt = php_http_option_register(registry, ZEND_STRL("random_file"), CURLOPT_RANDOM_FILE, IS_STRING))) { opt->flags |= PHP_HTTP_CURLE_OPTION_CHECK_STRLEN; opt->flags |= PHP_HTTP_CURLE_OPTION_CHECK_BASEDIR; @@ -2202,7 +2206,7 @@ static ZEND_RESULT_CODE php_http_client_curl_dequeue(php_http_client_t *h, php_h php_http_client_curl_t *curl = h->ctx; php_http_client_curl_handler_t *handler = enqueue->opaque; - if (h->callback.depth) { + if (h->callback.depth && !CG(unclean_shutdown)) { php_error_docref(NULL, E_WARNING, "Could not dequeue request while executing callbacks"); return FAILURE; }