CURLOPT_TCP_FASTOPEN: no support on Windows master
authorJan Ehrhardt <github@ehrhardt.nl>
Fri, 22 Oct 2021 12:41:34 +0000 (14:41 +0200)
committerJan Ehrhardt <github@ehrhardt.nl>
Fri, 22 Oct 2021 12:41:34 +0000 (14:41 +0200)
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

index daadf698e5b15f8058f7cd4a590e253fe652e8ba..b8ed3c54b6a5ce61c2bc95b57404cc8080438bfd 100644 (file)
@@ -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 */