Skip to content

Commit 43c864a

Browse files
committed
Add. Support CURLOPT_HTTP09_ALLOWED option.
Fix. Set SSL_VERIFYHOST
1 parent e70f6ac commit 43c864a

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

src/lceasy.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -334,10 +334,12 @@ static int lcurl_opt_set_long_(lua_State *L, int opt){
334334
if(lua_isboolean(L, 2)){
335335
val = lua_toboolean(L, 2);
336336
if( val
337-
&& (opt == CURLOPT_SSL_VERIFYHOST)
337+
&& (
338+
(opt == CURLOPT_SSL_VERIFYHOST)
338339
#if LCURL_CURL_VER_GE(7,52,0)
339-
&& (opt == CURLOPT_PROXY_SSL_VERIFYHOST)
340+
|| (opt == CURLOPT_PROXY_SSL_VERIFYHOST)
340341
#endif
342+
)
341343
){
342344
val = 2;
343345
}

src/lcopteasy.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -457,6 +457,10 @@ OPT_ENTRY(doh_url, DOH_URL, STR, 0, LCURL_DEFA
457457
OPT_ENTRY(upload_buffersize, UPLOAD_BUFFERSIZE, LNG, 0, 64 * 1024)
458458
#endif
459459

460+
#if LCURL_CURL_VER_GE(7,64,0)
461+
OPT_ENTRY(http09_allowed, HTTP09_ALLOWED, LNG, 0, 0)
462+
#endif
463+
460464
//{ Restore system macros
461465

462466
#ifdef LCURL__TCP_FASTOPEN

0 commit comments

Comments
 (0)