curl: fix gnutls include
[m6w6/ext-http] / src / php_http_client_curl.c
index ca39e937c6e9678f7401f2713574c34b0eb4b5cb..f286324d808cdb5e535a31668d2f4ed44c711e72 100644 (file)
@@ -21,7 +21,7 @@
 #      include <openssl/ssl.h>
 #endif
 #if PHP_HTTP_HAVE_LIBCURL_GNUTLS
-#      include <gnutls.h>
+#      include <gnutls/gnutls.h>
 #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;
        }