@@ -117,6 +117,9 @@ static int lcurl_version_info(lua_State *L){
117
117
#ifdef CURL_VERSION_MULTI_SSL
118
118
lua_pushliteral (L , "MULTI_SSL" ); lua_pushboolean (L , data -> features & CURL_VERSION_MULTI_SSL ); lua_rawset (L , -3 );
119
119
#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
120
123
121
124
lua_setfield (L , -2 , "features" ); /* bitmask, see defines below */
122
125
@@ -140,10 +143,19 @@ static int lcurl_version_info(lua_State *L){
140
143
if (data -> libidn ){lua_pushstring (L , data -> libidn ); lua_setfield (L , -2 , "libidn" );}
141
144
}
142
145
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 ){
144
148
lua_pushnumber (L , data -> iconv_ver_num ); lua_setfield (L , -2 , "iconv_ver_num" );
145
149
if (data -> libssh_version ){lua_pushstring (L , data -> libssh_version );lua_setfield (L , -2 , "libssh_version" );}
146
150
}
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
147
159
148
160
if (lua_isstring (L , 1 )){
149
161
lua_pushvalue (L , 1 ); lua_rawget (L , -2 );
0 commit comments