From 22a5807f92c56869939e69df2d42f1bd5ab6d0f0 Mon Sep 17 00:00:00 2001 From: Pierrick Charron Date: Sat, 19 Aug 2023 13:01:50 -0400 Subject: [PATCH] Fix GH-11755: Expose CURL_HTTP_VERSION_3 constant --- ext/curl/interface.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ext/curl/interface.c b/ext/curl/interface.c index 807b27cb78c90..0b45e3adf942f 100644 --- a/ext/curl/interface.c +++ b/ext/curl/interface.c @@ -1159,6 +1159,10 @@ PHP_MINIT_FUNCTION(curl) REGISTER_CURL_CONSTANT(CURL_VERSION_ALTSVC); #endif +#if LIBCURL_VERSION_NUM >= 0x074200 /* Available since 7.66.0 */ + REGISTER_CURL_CONSTANT(CURL_HTTP_VERSION_3); +#endif + #if LIBCURL_VERSION_NUM >= 0x074700 /* Available since 7.71.0 */ REGISTER_CURL_CONSTANT(CURLOPT_ISSUERCERT_BLOB); REGISTER_CURL_CONSTANT(CURLOPT_PROXY_ISSUERCERT); @@ -1169,6 +1173,10 @@ PHP_MINIT_FUNCTION(curl) REGISTER_CURL_CONSTANT(CURLOPT_SSLKEY_BLOB); #endif +#if LIBCURL_VERSION_NUM >= 0x075800 /* Available since 7.88.0 */ + REGISTER_CURL_CONSTANT(CURL_HTTP_VERSION_3ONLY); +#endif + REGISTER_CURL_CONSTANT(CURLOPT_SAFE_UPLOAD); #ifdef PHP_CURL_NEED_OPENSSL_TSL