@@ -117,6 +117,9 @@ static int lcurl_version_info(lua_State *L){
117117#ifdef CURL_VERSION_MULTI_SSL
118118 lua_pushliteral (L , "MULTI_SSL" ); lua_pushboolean (L , data -> features & CURL_VERSION_MULTI_SSL ); lua_rawset (L , -3 );
119119#endif
120+ #ifdef CURL_VERSION_BROTLI
121+ lua_pushliteral (L , "BROTLI" ); lua_pushboolean (L , data -> features & CURL_VERSION_BROTLI ); lua_rawset (L , -3 );
122+ #endif
120123
121124 lua_setfield (L , -2 , "features" ); /* bitmask, see defines below */
122125
@@ -140,10 +143,19 @@ static int lcurl_version_info(lua_State *L){
140143 if (data -> libidn ){lua_pushstring (L , data -> libidn ); lua_setfield (L , -2 , "libidn" );}
141144 }
142145
143- if (data -> age >= CURLVERSION_FOURTH ){ /* added in 7.16.1 */
146+ #if LCURL_CURL_VER_GE (7 ,16 ,1 )
147+ if (data -> age >= CURLVERSION_FOURTH ){
144148 lua_pushnumber (L , data -> iconv_ver_num ); lua_setfield (L , -2 , "iconv_ver_num" );
145149 if (data -> libssh_version ){lua_pushstring (L , data -> libssh_version );lua_setfield (L , -2 , "libssh_version" );}
146150 }
151+ #endif
152+
153+ #if LCURL_CURL_VER_GE (7 ,57 ,0 )
154+ if (data -> age >= CURLVERSION_FOURTH ){
155+ lua_pushnumber (L , data -> brotli_ver_num ); lua_setfield (L , -2 , "brotli_ver_num" );
156+ if (data -> brotli_version ){lua_pushstring (L , data -> brotli_version );lua_setfield (L , -2 , "brotli_version" );}
157+ }
158+ #endif
147159
148160 if (lua_isstring (L , 1 )){
149161 lua_pushvalue (L , 1 ); lua_rawget (L , -2 );
0 commit comments