From: Jan Ehrhardt Date: Fri, 22 Oct 2021 12:41:34 +0000 (+0200) Subject: CURLOPT_TCP_FASTOPEN: no support on Windows X-Git-Tag: v4.2.2~11 X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=commitdiff_plain;h=86b8a4396d03ad6161ba3d05dd4986521ec7e182 CURLOPT_TCP_FASTOPEN: no support on Windows Fixes https://github.com/m6w6/ext-http/issues/122 Error message: > Could not set option tcp_fastopen > (An unknown option was passed in to libcurl) --- diff --git a/src/php_http_client_curl.c b/src/php_http_client_curl.c index daadf69..b8ed3c5 100644 --- a/src/php_http_client_curl.c +++ b/src/php_http_client_curl.c @@ -1486,7 +1486,11 @@ static void php_http_curle_options_init(php_http_options_t *registry) } #endif #if PHP_HTTP_CURL_VERSION(7,49,0) +# if PHP_WIN32 + /* CURLOPT_TCP_FASTOPEN is not supported (yet) on Windows */ +# else php_http_option_register(registry, ZEND_STRL("tcp_fastopen"), CURLOPT_TCP_FASTOPEN, _IS_BOOL); +# endif #endif /* ssl */