From f84a41f0f7abc64088f87a469e5dfc95157e9fb0 Mon Sep 17 00:00:00 2001 From: Michael Wallner Date: Tue, 2 Mar 2021 10:26:03 +0100 Subject: [PATCH] add CURLOPT_HAPROXYPROTOCOL --- 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 1dfeaa9..8f5b2d5 100644 --- a/src/php_http_client_curl.c +++ b/src/php_http_client_curl.c @@ -1219,7 +1219,11 @@ static void php_http_curle_options_init(php_http_options_t *registry) opt->flags |= PHP_HTTP_CURLE_OPTION_CHECK_STRLEN; } #endif +#if PHP_HTTP_CURL_VERSION(7,60,0) + php_http_option_register(registry, ZEND_STRL("haproxy_protocol"), CURLOPT_HAPROXYPROTOCOL, _IS_BOOL); +#endif + /* unix sockets */ #if PHP_HTTP_CURL_VERSION(7,40,0) if (PHP_HTTP_CURL_FEATURE(CURL_VERSION_UNIX_SOCKETS)) { if ((opt = php_http_option_register(registry, ZEND_STRL("unix_socket_path"), CURLOPT_UNIX_SOCKET_PATH, IS_STRING))) { -- 2.30.2