Skip to content

Commit

Permalink
Add CURLMOPT_MAX_CONCURRENT_STREAMS
Browse files Browse the repository at this point in the history
  • Loading branch information
adoy committed Jun 8, 2022
1 parent 7fd36da commit f4cef90
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ext/curl/interface.c
Original file line number Diff line number Diff line change
Expand Up @@ -719,6 +719,7 @@ PHP_MINIT_FUNCTION(curl)
REGISTER_CURL_CONSTANT(CURLOPT_LOCALPORTRANGE);

/* Available since 7.15.3 */
REGISTER_CURL_CONSTANT(CURLFTPMETHOD_DEFAULT);
REGISTER_CURL_CONSTANT(CURLFTPMETHOD_MULTICWD);
REGISTER_CURL_CONSTANT(CURLFTPMETHOD_NOCWD);
REGISTER_CURL_CONSTANT(CURLFTPMETHOD_SINGLECWD);
Expand Down Expand Up @@ -1195,6 +1196,10 @@ PHP_MINIT_FUNCTION(curl)
REGISTER_CURL_CONSTANT(CURLINFO_RETRY_AFTER);
#endif

#if LIBCURL_VERSION_NUM >= 0x074300 /* Available since 7.67.0 */
REGISTER_CURL_CONSTANT(CURLMOPT_MAX_CONCURRENT_STREAMS);
#endif

#if LIBCURL_VERSION_NUM >= 0x074500 /* Available since 7.69.0 */
REGISTER_CURL_CONSTANT(CURLOPT_MAIL_RCPT_ALLLOWFAILS);
#endif
Expand Down
3 changes: 3 additions & 0 deletions ext/curl/multi.c
Original file line number Diff line number Diff line change
Expand Up @@ -441,6 +441,9 @@ static bool _php_curl_multi_setopt(php_curlm *mh, zend_long option, zval *zvalue
case CURLMOPT_MAX_HOST_CONNECTIONS:
case CURLMOPT_MAX_PIPELINE_LENGTH:
case CURLMOPT_MAX_TOTAL_CONNECTIONS:
#endif
#if LIBCURL_VERSION_NUM >= 0x074300 /* Available since 7.67.0 */
case CURLMOPT_MAX_CONCURRENT_STREAMS:
#endif
{
zend_long lval = zval_get_long(zvalue);
Expand Down

0 comments on commit f4cef90

Please sign in to comment.