From: Michael Wallner Date: Mon, 8 Mar 2021 11:19:26 +0000 (+0100) Subject: add CURLMOPT_MAX_CONCURRENT_STREAMS X-Git-Tag: v4.1.0~10 X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=commitdiff_plain;h=ed02721b0b9a64e7bec3e98e3dc4f535c3802e61;ds=sidebyside add CURLMOPT_MAX_CONCURRENT_STREAMS --- 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);