From 86b8a4396d03ad6161ba3d05dd4986521ec7e182 Mon Sep 17 00:00:00 2001 From: Jan Ehrhardt Date: Fri, 22 Oct 2021 14:41:34 +0200 Subject: [PATCH] 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) --- src/php_http_client_curl.c | 4 ++++ 1 file changed, 4 insertions(+) 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 */ -- 2.30.2