re-enable the factory
[m6w6/ext-http] / php_http_curl.c
index 569a4143ea371084e7b18d6f50586c00f769648a..866f2d869f15c7b677361f67709c8218be9ed73b 100644 (file)
@@ -90,6 +90,12 @@ static struct gcry_thread_cbs php_http_gnutls_tsl = {
 
 PHP_MINIT_FUNCTION(http_curl)
 {
+       php_http_client_factory_driver_t driver = {
+               php_http_client_curl_get_ops(),
+               php_http_client_pool_curl_get_ops(),
+               php_http_client_datashare_curl_get_ops()
+       };
+
 #ifdef PHP_HTTP_NEED_OPENSSL_TSL
        /* mod_ssl, libpq or ext/curl might already have set thread lock callbacks */
        if (!CRYPTO_get_id_callback()) {
@@ -113,6 +119,10 @@ PHP_MINIT_FUNCTION(http_curl)
                return FAILURE;
        }
 
+       if (SUCCESS != php_http_client_factory_add_driver(ZEND_STRL("curl"), &driver)) {
+               return FAILURE;
+       }
+
        return SUCCESS;
 }