add CURLMOPT_MAX_CONCURRENT_STREAMS
authorMichael Wallner <mike@php.net>
Mon, 8 Mar 2021 11:19:26 +0000 (12:19 +0100)
committerMichael Wallner <mike@php.net>
Mon, 8 Mar 2021 11:19:26 +0000 (12:19 +0100)
src/php_http_client_curl.c

index 82db05332944a140b01dc2e54af6d5fce296915c..e779ff5157f7e7640327ce477a540995988dcc04 100644 (file)
@@ -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);