From ed02721b0b9a64e7bec3e98e3dc4f535c3802e61 Mon Sep 17 00:00:00 2001 From: Michael Wallner Date: Mon, 8 Mar 2021 12:19:26 +0100 Subject: [PATCH] add CURLMOPT_MAX_CONCURRENT_STREAMS --- src/php_http_client_curl.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/php_http_client_curl.c b/src/php_http_client_curl.c index 82db053..e779ff5 100644 --- a/src/php_http_client_curl.c +++ b/src/php_http_client_curl.c @@ -1923,6 +1923,12 @@ static void php_http_curlm_options_init(php_http_options_t *registry) #if PHP_HTTP_CURL_VERSION(7,30,0) php_http_option_register(registry, ZEND_STRL("max_total_connections"), CURLMOPT_MAX_TOTAL_CONNECTIONS, IS_LONG); #endif +#if PHP_HTTP_CURL_VERSION(7,67,0) + if ((opt = php_http_option_register(registry, ZEND_STRL("max_concurrent_streams"), CURLMOPT_MAX_CONCURRENT_STREAMS, IS_LONG))) { + ZVAL_LONG(&opt->defval, 100); + } +#endif + #if !PHP_HTTP_CURL_VERSION(7,62,0) /* enable/disable HTTP pipelining */ php_http_option_register(registry, ZEND_STRL("pipelining"), CURLMOPT_PIPELINING, _IS_BOOL); -- 2.30.2