add CURLOPT_HAPROXYPROTOCOL
authorMichael Wallner <mike@php.net>
Tue, 2 Mar 2021 09:26:03 +0000 (10:26 +0100)
committerMichael Wallner <mike@php.net>
Tue, 2 Mar 2021 09:26:03 +0000 (10:26 +0100)
src/php_http_client_curl.c

index 1dfeaa9eedd1ff73dacf4231424e8f88cb75c03a..8f5b2d5b7275057200f0812cf56db34d5486584c 100644 (file)
@@ -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))) {