X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=http.c;h=fc7f15a3964361f984200bc6403ebf905642351e;hp=521f2b5ce58b7a0f660063e8e0ef8b3ac5b45f54;hb=42dd649e29ed164437f98039ed58fa5fdd5fb2c9;hpb=b3afcfc70bf06c062115f4994cc04fc8c6e4aa67 diff --git a/http.c b/http.c index 521f2b5..fc7f15a 100644 --- a/http.c +++ b/http.c @@ -31,7 +31,11 @@ #include "php_http_request_method_api.h" #ifdef HTTP_HAVE_CURL # include "php_http_request_api.h" +# include "php_http_request_pool_api.h" # include "php_http_request_datashare_api.h" +# ifdef HTTP_HAVE_PERSISTENT_HANDLES +# include "php_http_persistent_handle_api.h" +# endif #endif #ifdef HTTP_HAVE_ZLIB # include "php_http_encoding_api.h" @@ -101,6 +105,10 @@ zend_function_entry http_functions[] = { PHP_FE(http_get_request_body_stream, NULL) PHP_FE(http_match_request_header, NULL) #ifdef HTTP_HAVE_CURL +# ifdef HTTP_HAVE_PERSISTENT_HANDLES + PHP_FE(http_persistent_handles_count, NULL) + PHP_FE(http_persistent_handles_clean, NULL) +# endif PHP_FE(http_get, http_arg_pass_ref_3) PHP_FE(http_head, http_arg_pass_ref_3) PHP_FE(http_post_data, http_arg_pass_ref_4) @@ -280,6 +288,10 @@ PHP_MINIT_FUNCTION(http) (SUCCESS != PHP_MINIT_CALL(http_send)) || (SUCCESS != PHP_MINIT_CALL(http_url)) || #ifdef HTTP_HAVE_CURL +# ifdef HTTP_HAVE_PERSISTENT_HANDLES + (SUCCESS != PHP_MINIT_CALL(http_persistent_handle)) || + (SUCCESS != PHP_MINIT_CALL(http_request_pool)) || +# endif (SUCCESS != PHP_MINIT_CALL(http_request)) || # ifdef ZEND_ENGINE_2 (SUCCESS != PHP_MINIT_CALL(http_request_datashare)) || @@ -327,7 +339,11 @@ PHP_MSHUTDOWN_FUNCTION(http) # ifdef ZEND_ENGINE_2 (SUCCESS != PHP_MSHUTDOWN_CALL(http_request_datashare)) || # endif - (SUCCESS != PHP_MSHUTDOWN_CALL(http_request))) { + (SUCCESS != PHP_MSHUTDOWN_CALL(http_request)) +# ifdef HTTP_HAVE_PERSISTENT_HANDLES + || (SUCCESS != PHP_MSHUTDOWN_CALL(http_persistent_handle)) +# endif + ) { return FAILURE; } #endif