From 43c864ad9a11fad2bd5593979e542d809e93b91a Mon Sep 17 00:00:00 2001 From: Alexey Melnichuk Date: Sat, 6 Apr 2019 19:50:29 +0300 Subject: [PATCH] Add. Support CURLOPT_HTTP09_ALLOWED option. Fix. Set SSL_VERIFYHOST --- src/lceasy.c | 6 ++++-- src/lcopteasy.h | 4 ++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/lceasy.c b/src/lceasy.c index bccc1d0..69fb0dd 100644 --- a/src/lceasy.c +++ b/src/lceasy.c @@ -334,10 +334,12 @@ static int lcurl_opt_set_long_(lua_State *L, int opt){ if(lua_isboolean(L, 2)){ val = lua_toboolean(L, 2); if( val - && (opt == CURLOPT_SSL_VERIFYHOST) + && ( + (opt == CURLOPT_SSL_VERIFYHOST) #if LCURL_CURL_VER_GE(7,52,0) - && (opt == CURLOPT_PROXY_SSL_VERIFYHOST) + || (opt == CURLOPT_PROXY_SSL_VERIFYHOST) #endif + ) ){ val = 2; } diff --git a/src/lcopteasy.h b/src/lcopteasy.h index 166b07d..a213f23 100644 --- a/src/lcopteasy.h +++ b/src/lcopteasy.h @@ -457,6 +457,10 @@ OPT_ENTRY(doh_url, DOH_URL, STR, 0, LCURL_DEFA OPT_ENTRY(upload_buffersize, UPLOAD_BUFFERSIZE, LNG, 0, 64 * 1024) #endif +#if LCURL_CURL_VER_GE(7,64,0) +OPT_ENTRY(http09_allowed, HTTP09_ALLOWED, LNG, 0, 0) +#endif + //{ Restore system macros #ifdef LCURL__TCP_FASTOPEN